Review of Control and Energy Management Approaches in Micro-Grid Systems

: The demand for electricity is increased due to the development of the industry, the elec-triﬁcation of transport, the rise of household demand, and the increase in demand for digitally connected devices and air conditioning systems. For that, solutions and actions should be developed for greater consumers of electricity. For instance, MG (Micro-grid) buildings are one of the main consumers of electricity, and if they are correctly constructed, controlled, and operated, a signiﬁcant energy saving can be attained. As a solution, hybrid RES (renewable energy source) systems are proposed, offering the possibility for simple consumers to be producers of electricity. This hybrid system contains different renewable generators connected to energy storage systems, making it possible to locally produce a part of energy in order to minimize the consumption from the utility grid. This work gives a concise state-of-the-art overview of the main control approaches for energy management in MG systems. Principally, this study is carried out in order to deﬁne the suitable control approach for MGs for energy management in buildings. A classiﬁcation of approaches is also given in order to shed more light on the need for predictive control for energy management in MGs.


Introduction
Proper management of energy flow in MG (Micro-grid) systems must be carried out in order to improve the global performance of the system, to minimize the cost of the electrical bill, and to extend the lifetime of its components (e.g., converters, batteries, fuel cells). In general, energy management (EM) approaches involve an objective function, which could be used to maximize the efficiency of the hybrid RES system and to minimize energy consumption while improving the consumers' quality of services. For instance, an EM control strategy that considers only the availability of the electricity can be developed to switch, at each time, from RESs (renewable energy sources) to storage devices or to the utility grid without considering the electricity price or the profitability of the system. In other cases, control strategies can interact with the generators by limiting the power generation. The aim is to ensure the electrical quality of services and, consequently, minimize the profitability of the installation. However, despite the ability of these strategies to reach the defined objective, they might decrease the performance of other criteria, such as the batteries' lifetime, the system's installation cost, and profitability.
Actual commercial inverters provide high-performance energy balance by interconnecting RESs, energy storage systems, and the utility grid, taking into consideration only a single-objective function. This later is mainly implemented in order to increase the availability of the electricity for building's loads. With a limited configuration, the inverter can use batteries or the TEG at any moment without taking into account other constraints, such as the electricity cost and the C/D (charge/discharge) cycle of the batteries. For instance, high and frequent cycles of the C/D cycle of batteries could decrease their performance while reducing the system's profitability. EM strategies that are deployed in the actual inverters use "if-else" statements to perform real-time decisions. For instance, the defined setpoint values (i.e., control inputs) cannot be adjusted according to predictive variations of RESs production, load demand, and battery SoC (state of charge). Such EM strategies are considered as "passive strategy" in their decisions and actions [1]. Control strategies incorporating multiple-objective functions are therefore required for efficient energy management (i.e., ensuring electricity availability) while taking into consideration operational constraints (e.g., costs, reliability, and flexibility). In fact, "active strategies" for EM should be developed in order to adapt the setpoint values accordingly. These strategies could use intelligent and predictive control techniques together with recent IoT/Big-data technologies (e.g., data monitoring, data analysis, data mining, machine learning) for efficient EM in hybrid RES systems. In this work, control structures and strategies from the literature are presented by highlighting their advantages and drawbacks in the context of MG for smart buildings.

Control Architectures
In hybrid energetic systems or MG systems, distributed and hybrid RES generators (e.g., PV (photovoltaic) panels and wind turbines) are used to produce clean energy (e.g., solar, wind), while energy storage systems are installed to compensate the fluctuation between RESs generation and load consumption. These hybrid systems can either operate on grid-connected or standalone modes depending on desired and fixed objectives. However, while the penetration of these distributed generators is continuously growing, new energy management approaches are required for their seamless integration within existing electricity network. Table 1 presents resent literature works concerning the deployment of hybrid systems. As highly stated in Table 1, batteries are the most commonly used devices for energy storage. The Multi-Objective Particle Swarm Optimization algorithm is used to improve electric energy utilization in remote areas. Simulation results are presented. [3] The development of a methodology for modeling and optimally sizing a hybrid system of RESs and two energy storage devices (hydrogen and batteries). Simulation results are presented. [4] The Crow search algorithm is used to optimize and size a hybrid system. Two constraints are considered to minimize the total net cost: Loss of power supply probability and renewable energy portion. Simulation results are presented. [5] The operation of a grid-connected hybrid PV-wind system is performed using a standalone inverter capable of working in grid-connection mode and standalone mode. Experimental investigations are presented.  [6] The work proposed a real-time EM control strategy combining wavelet transform, neural network, and fuzzy logic methods. Experimental results exposed that the power variation and the peak power of the battery pack have been successfully suppressed. [7] An intelligent control strategy is developed for a hybrid energy storage system, composed of fuel cell, battery, and super capacitor.
Multi-input/multi-output state-space model is used to perform the study. Simulation results are presented. [8] A multi-objective optimization problem, over a receding control horizon, is used for energy storage dispatch and sharing of renewable energy resources in a network of grid-connected MG. The multi-objective optimization is formulated as a lexicographic program to allow preferential treatment of multiple MG. Simulation results are presented. [9] An economic linear programming model is developed with a sliding-time-window to assess design and scheduling of biomass, combined heat and power-based MG systems. Simulation results are presented. [10] Distribution network including RESs is studied for optimal dispatch model of mixed-power generation by considering the charging/discharging scheduling of battery. Bee-colony-optimization method is proposed to solve the daily economic dispatch of MG systems. Simulation results are presented. [11] A combined sizing and EM methodology is proposed and formulated as a leader-follower problem. The leader problem focuses on sizing and aims at selecting the optimal size for the MG components. It is solved using a genetic algorithm. Simulation results are presented. [12] A strategy for the optimal management of a multi-good standalone MG integrated with RES is investigated. The proposed approach is defined through an EM model able to determine the schedule of each programmable unit to fulfil the community needs at the lowest operation cost. Simulation results are presented. [13] Electrical vehicles are used for peak shaving and load curve correction in a MG system. The deployed methods deal with the simultaneous scheduling of electrical vehicles and reactive loads in order to minimize operation cost and emission in presence of RES in MG system. Simulation results are presented. [14] A power management system is presented to manage the power output from RES, fuel cell, and batteries with delivery of hydrogen from an electrolyzer. The deployed strategy handles the source effectively by considering the limited lifecycle of storage devices. It eliminates the need for a dump load in the MG when the storage devices are charged to the maximum capacity. Simulation results are presented.
Therefore, the deployment of an energy management approach should be able to enhance the dynamic response of distributed energy resources under different operating conditions and maximize the usage of RES power generation while ensuring the stability when one or more sources are connected or disconnected into/from the system. In this way, different approaches from literature have been proposed for EM ( Table 2). As shown in Table 2, the most suitable control strategies could be selected according to fixed constraints and objective functions. These control strategies can be classified into three main categories: Centralized, decentralized, and hierarchal control, as mentioned in Figure 1. These control strategies are presented in the rest of this section. Authors proposed a combined EM and sizing methodology, formulated as a leader follower problem. The leader problem focuses on sizing and aims at selecting the optimal size for the MG components. The problem is solved using a genetic algorithm and the follower problem is formulated as a unit commitment problem and is solved with a mixed integer linear program.
Mixed integer linear program Small Centralized [14] Authors proposed an EM approach to divert excess energy of PV to the electrolyzer. Linear Programming Small Centralized [15] An analysis of energy management system of a MG using a robust optimization taking the uncertainties of wind power and solar power generations and energy consumption into consideration.
Agent-based modelling Large Decentralized An algorithm for EM system of a MG using multi-layer ant colony approach pointing on determining the optimum point of operation for local distributed energy generation with least electricity production cost. The studied algorithm has the capability of analyzing the constraints related to economic and technical aspects of the problem.
Multi-layer ant colony approach Medium Not specified [17] A method known as contingency-based energy management for a system of MGs. A stochastic optimization is proposed according to various scenarios of the contingencies.
Contingency-based energy management Large Hierarchical [18] A fuzzy EM approach is deployed to smooth the power flow of a MG containing heat and power unit. The aims is to use the surplus of electrical power of the MG for storing in electrical energy storage systems and ensuring the water temperature of the thermal storage system in the desired value in order to supply residential buildings.
Fuzzy energy management strategy Medium Not specified [19] A model predictive control technique to determine the optimal operation of the MG system using an extended horizon of evaluation and recourse. The EM problem is decomposed into Unit Commitment and Optimal Power Flow problems in order to avoid a mixed-integer non-linear formulation.
Model predictive control Large Centralized [20] Authors present an EM system to minimize the daily operating cost of a MG and maximize the self-consumption of the deployed RES by selecting the best setting for a central battery storage system based on a defined cost function.
Convex Programming, Model Predictive, and Rolling Horizon Medium Hierarchical [21] The operating cost of MG is minimized, while considering droop controlled active and reactive power dispatch of AC side MG as a constraint.

Mixed integer nonlinear programming Small Centralized
Energies 2020, 13, x 5 of 32 optimization is proposed according to various scenarios of the contingencies. [18] A fuzzy EM approach is deployed to smooth the power flow of a MG containing heat and power unit. The aims is to use the surplus of electrical power of the MG for storing in electrical energy storage systems and ensuring the water temperature of the thermal storage system in the desired value in order to supply residential buildings.
Fuzzy energy management strategy Medium Not specified [19] A model predictive control technique to determine the optimal operation of the MG system using an extended horizon of evaluation and recourse. The EM problem is decomposed into Unit Commitment and Optimal Power Flow problems in order to avoid a mixed-integer non-linear formulation.
Model predictive control Large Centralized [20] Authors present an EM system to minimize the daily operating cost of a MG and maximize the selfconsumption of the deployed RES by selecting the best setting for a central battery storage system based on a defined cost function.

Programming, Model Predictive, and Rolling Horizon
Medium Hierarchical [21] The operating cost of MG is minimized, while considering droop controlled active and reactive power dispatch of AC side MG as a constraint.
Mixed integer nonlinear programming Small Centralized Figure 1. Control structure for energy management in MG systems.

Centralized Control
Centralized control approaches use a single central controller (CC), which is characterized by a high-performance computing unit and a secure communication infrastructure in order to manage

Centralized Control
Centralized control approaches use a single central controller (CC), which is characterized by a high-performance computing unit and a secure communication infrastructure in order to manage different entities of the system (e.g., RESs, storage systems, TEG). Each entity uses a local controller (LC) in order to communicate and directly interact with the CC. Moreover, using recent communication and computing technologies (e.g., IoT, Big-Data), the CC is able to monitor, collect, and analyze real-time data. This allows all entities to collaborate with the central EM controller while ensuring a flexible MG operation in both grid-connected and standalone mode ( Figure 2). The CC collects data, such as RES energy production, energy consumption pattern, the energy price from market operators, and weather conditions, and then executes the optimal and efficient system's control.  Numerous research works have developed and deployed centralized EM strategies. For instance, the authors of [22] proposed a centralized controller in order to optimize the operation of MG by maximizing the production of distributed RESs generators while establishing back-and-forth energy transfer with the main utility grid. The efficiency of the proposed solution on MG system was investigated by considering a typical case network operating under various market policies and spot market prices. Moreover, the authors of [19] developed a centralized EM system for a standalone MG system based on the model predictive control method in order to reduce the computational loads. In fact, the studied problem was solved iteratively by nonlinear programming (NLP) and mixed integer linear programming (MILP) techniques. Other centralized control strategies are summarized in Table 2. However, despite the ease of implementing the centralized strategies, they have shown their limits, especially when dealing with large-scale hybrid systems [23].

Decentralized Control
Unlike centralized strategies, in decentralized control, each entity is considered autonomous using a LC. This means that groups of entities are controlled separately by a leader. In literature, the terms 'decentralized' and 'distributed controls' are often used in place of each other [24,25]. The distributed control can be considered as a decentralized control in which LCs use local measurements, such as frequency and voltage values, to elect the leader entity. They are also allowed to share information with neighbors. For a distributed control, LCs do not only use local measurements but also are able to send and receive required information to other LCs [26]. In decentralized control approaches, limited local connections are required and the control decisions are made based only on local measurements (Figure 3). It does not require a high-performance computing unit and a high-level connectivity [27]. However, monitoring, processing, and data visualization is considered critical in order to coordinate various distributed controllers and achieve a global operation goal. This process is standardized by the norm IEC-61968 for a single-building energy management system and by IEC-61850 for interoperability between building MG systems [28,29]. Depending on the communication network availability, the decentralized control can be classified into three operation modes: (i) Fully dependent, in which the distributed controllers generate local control decision while communicating information with each other via a CC; (ii) partially independent, in which LCs communicate with each other and share information with the CC in order to generate central decisions; and (iii) fully independent, in which the distributed controllers communicate directly with each other and independently from the CC [30]. However, despite the flexibility of these operational modes, the decentralized control structure presents low performance compared to centralized control [25,[31][32][33]. This is due to the low response time and the incomplete information about the total MG system installation.

Hierarchical Control
Hierarchical control is mainly proposed for SG (smart grid) systems. In fact, the extended geographic areas of these systems and the extensive communication and computation requirements make the implementation of fully centralized approaches a difficult task. At the same time, higher coupling between the different LCs requires a maximum level of coordination, which cannot be achieved by decentralized control structures. However, a compromise between the fully centralized As depicted in Figure 3, each LC operates individually on managed energy sources, storage systems, and loads without central control. The control decisions are determined locally based on local measurements, which are shared among controllers using peer-topeer communication.
However, monitoring, processing, and data visualization is considered critical in order to coordinate various distributed controllers and achieve a global operation goal. This process is standardized by the norm IEC-61968 for a single-building energy management system and by IEC-61850 for interoperability between building MG systems [28,29]. Depending on the communication network availability, the decentralized control can be classified into three operation modes: (i) Fully dependent, in which the distributed controllers generate local control decision while communicating information with each other via a CC; (ii) partially independent, in which LCs communicate with each other and share information with the CC in order to generate central decisions; and (iii) fully independent, in which the distributed controllers communicate directly with each other and independently from the CC [30]. However, despite the flexibility of these operational modes, the decentralized control structure presents low performance compared to centralized control [25,[31][32][33]. This is due to the low response time and the incomplete information about the total MG system installation.

Hierarchical Control
Hierarchical control is mainly proposed for SG (smart grid) systems. In fact, the extended geographic areas of these systems and the extensive communication and computation requirements make the implementation of fully centralized approaches a difficult task. At the same time, higher coupling between the different LCs requires a maximum level of coordination, which cannot be achieved by decentralized control structures. However, a compromise between the fully centralized and decentralized control structures is realized by providing hierarchical control structures [34,35] according to three control levels: Primary, secondary, and tertiary, as depicted in Figure 4.  The primary control level stabilizes the voltage and frequency generated from each source in order to respect the limits required by the standards [36][37][38]. In addition, the primary control level detects the operating mode of MG systems, offering the ability to operate in grid-connected and standalone modes [39]. For the secondary control level, the MG voltage and frequency are restored after system's load variation. The aim is to ensure and enhance the power quality within the required standards values, allowing the synchronization between the MG systems and the main electrical network [40].
The main objectives of tertiary control are the power flow control in the grid-connected mode, ensuring then the optimal operation in both modes like capacitance and inductance [41]. Figure 5 includes the structures of each level of the hierarchical control. The control levels differ in the response time frame speed in which they operate as well as the infrastructure requirements, especially for the communication, which is normalized by the standards IEC 61850-7-420 and EN13757-4 [36]. The hierarchical control can be implemented in parallel in both centralized and distributed structure. The advantages and disadvantages of each control structure are presented in Table 3. Table 3. Control architectures for hybrid system, advantages and inconveniences.

EM Advantages Inconveniences
• Strong controllability and real-time observability of the whole MG system; • Provides strong supervision and wide control

•
The failure of the CC affects the whole system operation; • Heavy computation burden is a technical barrier for The primary control level stabilizes the voltage and frequency generated from each source in order to respect the limits required by the standards [36][37][38]. In addition, the primary control level detects the operating mode of MG systems, offering the ability to operate in grid-connected and standalone modes [39]. For the secondary control level, the MG voltage and frequency are restored after system's load variation. The aim is to ensure and enhance the power quality within the required standards values, allowing the synchronization between the MG systems and the main electrical network [40].
The main objectives of tertiary control are the power flow control in the grid-connected mode, ensuring then the optimal operation in both modes like capacitance and inductance [41]. Figure 5 includes the structures of each level of the hierarchical control. The control levels differ in the response time frame speed in which they operate as well as the infrastructure requirements, especially for the communication, which is normalized by the standards IEC 61850-7-420 and EN13757-4 [36]. The hierarchical control can be implemented in parallel in both centralized and distributed structure. The advantages and disadvantages of each control structure are presented in Table 3.

Control Strategies
The deployment of more than one energy source in MG systems requires the use of efficient control strategies/approaches for managing energy flow. This requires the development and deployment of EM systems. EM systems should be able to effectively coordinate energy sharing and trading among all electrical networks while supplying loads according to the operational conditions and economic constraints with secure, reliable, and efficient power system operation. In fact, optimization techniques for D/R, demand-side management, and power quality management are needed to achieve different EM system objectives while satisfying multiple constraints, such as electricity price minimization and occupants' comfort maximization, as mentioned in Figure 6. The concept of EM system is not new and began with the first electrical network, known as "Energy Control Center." In the past decade, the electrical network has been developed and new challenges have been evolved. Consequently, new ICTs (information and communication technologies) have been deployed in order to improve the electrical power sector.
The EM system was also developed to be renamed as a SCADA-EMS (supervisory control and data acquisition-energy management system), which is charged to deploy various control techniques like services control, distributed management systems, and demand-side management [33]. With the deployment of RESs, the EM system should be capable of creating an energy balance between the variable demand and the stochastic RES generation in an efficient manner. It could have a control center, which is capable of supervising, monitoring, managing, and optimizing the operation of distributed generators, diversified consumers, and the transport/distribution facility of the electricity. Actually, the EM system is not limited to the classical control objective, but has been developed to work for real-time applications, predictive control scheduling, and transmission security management.
Several approaches have been proposed and have used diversified objective functions and constraints together with optimization methods for efficient energy management, as depicted in Figure 6.

Objective Functions and Constraints
The deployment of EM control strategies specifies the main objective functions, which could be related to the operation cost, pollution, reliability, and power quality [11,[45][46][47]. For instance, the main aim of using economic objective functions is to minimize the electricity price. Different formulations have been studied for cost minimization in MGs. For instance, the authors of [48] an EM strategy for electricity cost minimization in residential MG, which was constituted by multiple households with distributed energy resources. This EM strategy considered predefined purchasing/selling decisions, at each time slot, for reducing the electricity cost as well scheduling decisions for the shifted loads. The authors of [49] formulated the cost minimization as a dynamic economic load dispatch problem. A metaheuristic algorithm was introduced and compared with other methods, such as the differential evolution algorithm, genetic algorithm, and particle swarm optimization. The authors of [50] proposed an optimal strategy by evaluating the performance of different hybrid MG systems. A mathematical model was studied for sizing the component of the MG in order to meet the lowest possible cost while maximizing load demand under varying weather conditions. The obtained results presented the optimal configuration for MG system components to achieve the lowest cost of energy and net present cost. In addition, the dynamic analysis showed that, in order to reduce the voltage-drop during disturbances, it is essential to carefully install the sources in the buses connected to high energy demand. The authors of [20] presented an EM system to minimize the daily operating cost of a MG while maximizing the self-consumption of the deployed RES by selecting the best setting for a central battery storage system according to a defined cost function. A simple comparison was made to show the advantages of two different layer controllers: The rolling horizon predictive controller and modem predictive controller. The experimental results showed the performance of the proposed strategy to work in real-time with high accuracy. The yearly RES self-consumption and the yearly operation cost of the MG were calculated with and without the rolling horizon, showing the utility of the method to minimize the cost. Another interesting work was presented by the authors of [51], who introduced an optimization model for managing a residential MG which contained RESs and a charging spot with a "vehicle-to-grid" system. In this EM system, not only were energy costs considered, but battery installation costs were also introduced in the system minimization.
The deployment of EM approaches, which consider the pollution factor as an objective function, take time to validate, since the whole procedure should consider the life cycle of the different deployed equipment. In fact, every new energy source technology which is promoted as being "renewable" or "sustainable" is subject to an energy balance analysis in order to calculate the net energy yield. The energy analysis does not only consider the data for present generation systems, but also the data for the probable improvements in production and energy system technology [52]. The equivalent CO 2 , generated during the fabrication of each component, should be calculated and compared to the equivalent energy which is generated during its life cycle. We consider that this energy is generated by traditional sources in order to estimate the equivalent CO 2 emission and that, by comparing these two elements of CO 2 generation, the profitability of the system concerning the pollution objective can be defined. For example, the authors of [53] studied the life cycle of the balance system component of 3.5 MW p multi-crystalline PV installation. The life cycle and the boundary conditions were calculated for each component of a PV installation (e.g., PV metal support, aluminum frames). The authors of [52] presented estimations of the energy requirements for manufacturing PV systems and evaluated the energy balance for an example of PV system applications. The work investigated the effects of the future developments in PV generation technology in order to assess the long-term predictions of PV system as a candidate for a sustainable energy supply and for CO 2 mitigation. The authors considered the energy payback time to estimate the CO 2 mitigation potential and concluded that 90% of greenhouse gas emissions during the PV system life cycle are caused by the energy used during system manufacturing and not during the system operation.
Like economic and pollution aspects, the term 'reliability' covers different aspects concerning the system operation cost, profitability, fails and maintenance, and productivity. Consequently, as mentioned above, RESs have a significant cost and consume a lot of energy in their fabrication. In order to maximize the profitability and system's reliability, the production of these sources should be maximized. Therefore, the main aim is to maximize the use of renewable energy generation, minimizing the loss of energy, keeping the storage energy system at a good state of health, and ensuring a safety and efficient supply of energy to the loads. In this way, the authors of [54] presented an electricity market strategy for reliability enhancement of islanded multi-MG systems. A technoeconomical objective function was deployed to account the profit of MG owners and to enhance the reliability of the system as well. Distribution functions were used for the probabilistic modeling of RESs and loads, and an electricity market strategy was proposed to improve the profit of the MG owners. However, the power quality, particularly the power loss, is still a main issue for the system's reliability. Therefore, several works have proposed suitable EM methods and control techniques to minimize the power loss in MG systems. For instance, the authors of [55] integrated a MG with static synchronous compensator controller in order to ensure the higher power flow with enhanced voltage profile and reduced power loss. They concluded that the static synchronous compensator controller raises the capacity of the distribution line and contributes to voltage profile improvements and power loss reduction. Similar works have considered the concept of power loss minimization, such as those presented by the authors of [56][57][58]. Several objective function can be considered for the deployment of the EM strategies. The reliability improvement is a noticeable task in modern power systems due to its direct influence on the electricity price and more precisely social safety [59]. The auhors of [59] studied an approach for optimal operation of distribution networks. A hybrid algorithm (Grey-Wolf Optimizer and Particle Swarm Optimization) was proposed to solve the proposed multiobjective function. The results were compared with those presented in literature works to demonstrate the powerful of the proposed algorithm. A beneficial literature work for multi-objective EM was improved by the authors of [60], who studied a multi-objective EM in an MG system. Techno-economic analysis and energy dispatch were presented for standalone and grid-connected MG infrastructure with hybrid RESs and storage devices. After defining the system's constraints and objective functions, suitable optimization methods are required to accordingly ensure the exchange of power flow between the installed RES/storage and the MGs on the one hand, and between MGs and the utility grid on the other hand. The rest of this section is dedicated to an overview of main methods from literature.

Optimization and Control Methods
Numerous research works have been carried out for MG control according to system's topologies, structures, and operation modes [33,61,62]. For example, optimization and control methods should manage the stochastic nature of the installed RES generators by ensuring a reliable supply of power to consumers while keeping the storage system, electricity bill, and occupants' comfort at the acceptable operation conditions. Figure 7 presents a proposed classification of the MG control methods commonly used in MG operations. A brief description of each method is presented in the rest of this section. Furthermore, various steps should be specified, as depicted in Figure 8, for EM in MG.

Predictive Control Methods
Recently, predictive control approaches have been proposed for advanced systems control according to defined constraints with the aim of developing predictive controllers for efficient energy flow in MG systems. These controllers could forecast future actions and decisions, but they require forecasted inputs' values (e.g., power consumption/production). With recent progress in IoT and Bigdata technologies, together with ML, it now possible to deploy sensors for gathering contextual data [63]. These data could be processed and used for predicting n-step-ahead values. Therefore, the forecasted values are the main inputs for generating the most suitable and future actions by predictive control approaches [64,65].
MPC and GPC are the well-known approaches, having the capabilities of predicting future events and forecasting right control decisions accordingly. In fact, they have the ability to incorporate

Predictive Control Methods
Recently, predictive control approaches have been proposed for advanced systems control according to defined constraints with the aim of developing predictive controllers for efficient energy flow in MG systems. These controllers could forecast future actions and decisions, but they require forecasted inputs' values (e.g., power consumption/production). With recent progress in IoT and Big-data technologies, together with ML, it now possible to deploy sensors for gathering contextual data [63]. These data could be processed and used for predicting n-step-ahead values. Therefore, the forecasted values are the main inputs for generating the most suitable and future actions by predictive control approaches [64,65].
MPC and GPC are the well-known approaches, having the capabilities of predicting future events and forecasting right control decisions accordingly. In fact, they have the ability to incorporate optimization mechanisms, which makes it possible to integrate system's constraints and disturbances in forecasted control decisions. For instance, the GPC is widely used in advanced control applications, such as in EM and buildings' automation systems [66,67]. For example, the authors of [68] introduced a home EM system for battery storage and PV systems. For the optimal operation strategy, the proposed planning was expressed as a stochastic mixed-integer nonlinear programming. The power generated by the PV system was considered as an uncertain parameter and modeled by a probability distribution function. The battery storage system was used to store energy during offpeak/low-cost hours and discharge energy during on-peak/high-cost hours. However, the main limitation of this EM strategy was the passive reaction of the system with the cost and the peak demand variability. It was programmed by a fixed time interval that presented predefined periods of on-peak and high-cost and was not defined by an active function for the interactive variability of the cost and the electricity demand. Moreover, the authors of [67] proposed an adaptive and dynamic optimization technique based on the stochastic MPC approach. The proposed EM approach was applied for distributed energy resources scheduling problem for a set of smart homes with different sources of energy. Its aim was to address the uncertainty and variability issues of the PV power generation. This study was designed for large-scale smart houses by taking into consideration their cooperation with their neighbors. Another interesting work was presented by the authors of [69], who proposed an EM system using an MPC, where a simple state-space model was used for the performance modeling of a MG system. This work considered the RES power production and the consumption as measured disturbances parameters for the EM system. Therefore, the storage systems and the cost were modeled as constraints for the MG system, which were solved by the state-space equations. In addition, other works have been presented in the literature which have referred to the optimal control of RES in MG systems considering hybrid storage systems, as detailed by the authors of [70]. The authors of [71] used the MPC for optimal control of distributed energy resources with a battery storage system. A mixed-logical framework was applied to model the deployed household system. In other works, the MPC was used for EM of MG systems that were connected to the charging station for electrical vehicles [72][73][74]. The authors of [72] used an algorithm based on the MPC model for the economic optimization of an MG laboratory. The laboratory contained a hybrid storage system composed of hydrogen storage and battery bank with a connection to the utility grid and a charging station for electric vehicles. A hierarchical control structure was proposed together with the MPC method, which operated at different timescales. The proposed methods operated on the first level to maintain the MG stability and on the second level in order to perform the management of electricity purchase and sale to the utility grid, manage the use of energy storages, and maximize the use of RESs. The presented results showed the reliable operation of the proposed control algorithm to manage the MG system. The authors of [73] proposed an optimal EM approach based on the MPC controller for the MG with external agents, including battery storage system and fuel cell electric vehicles. The MPC problems were solved by a mixed-integer quadratic programming. The Mixed Logic Dynamic framework was used to model the plant, and the operation and degradation costs were included in the objective function. The proposed approach considered the best time period in to recharge/refuel the vehicle, finding lower prices for the recharge of the vehicle battery or the refueling of the vehicle fuel cell if they were planned before the day-ahead market session. Therefore, generic MPC models were introduced by the authors of [75,76] for economic optimization in MG systems. The authors of [75] presented mathematical optimization models of residential energy hubs. The model can be readily integrated into household automation systems and EM systems to improve their effectiveness and reduce the total energy costs and emissions while considering their preferences and comfort. Mathematical models of major household demands have been developed. The authors of [76] developed an MPC approach to optimize an MG system's operation. A mixed-integer-linear framework was illustrated, which included economic dispatch, energy storage, unit commitment, and grid interaction. The cost was addressed and parameterized in detail in the problem formulation. The experimental results were presented, showing the performance of the proposed approach to save money compared to the current practice.
It is worth noting that the MPC family was proposed for electronic power, especially power converter control. The GPC is one of the CCS-MPC (Continuous Control Set MPC) methods that calculate a continuous control command in order to generate the desired output of the power converter. The CCS-MPC models have a lower computational cost than the other existing methods, such as the FCS-MPC (Finite Control Set), OSV-MPC (Optimal Switching Vector), and OSS-MPC (Optimal Switching Sequence) [77]. It can be used for long predictive horizon problems by calculating the control actions beforehand and then limiting the online computation burden. Mainly, the calculation time is the main factor for the deployment of MPC control families. In past decades, the development of computing units and the integration of ICTs and ML algorithms for power electronic applications has encouraged the use of predictive control for the power converter. For instance, the authors of [78,79] used an FCS-MPC for the current control of three-phase inverter. The authors of studied this in [80] for a multiphase inverter, the authors of [81,82] for a multilevel inverter, and the authors of [83,84] for a matrix converter. For more details, we refer readers to an interesting review, which is related to predictive control applications in power electronics [85]. These approaches offer the possibility to integrate multiple-objective functions and constraints with the possibility of integration in the different control levels. Mainly, with the integration of the new ICT, the predictive control can be developed to present high performance for control command and action predictions. In addition, the use of ML algorithms to forecast the control input parameters offers more reliability and flexibility to the predictive control approaches.

Classical Approaches
Many EM optimization approaches are based on classical approaches, such as mixedinteger linear and nonlinear programming. These approaches can be considered as efficient methods for MG systems control according to the specified objective and constraints. For instance, the authors of [86] proposed a MG EM system for power sharing, power trading with the main grid, continuous run, and on/off mixed mode based on the linear programming optimization method. In this study, the on/off mode was solved by a MILP solution approach, which optimized the operation of MG with respect to the operation mode of the main grid, fuel cell, and energy storage system. The authors of [87] developed a real-coded genetic algorithm and a MILP-based method to schedule the unit commitment and economic dispatch of MG units. The work considered the voltages limits, equipment loadings, and unit constraints in its formulation, and the proposed algorithm deployed a flexible set of sub-functions and intelligent convergence behavior, as well as diversified searching approaches and penalty methods for constraint violations. At the same, a method was investigated to deal with the constraints of MILP algorithm in handling the nonlinear network topology constraints. Another interesting work was presented by the authors of [88], who proposed an MILP-based approach for managing electrical and heat demands in a multiple MG environment. The proposed strategy considered different energy converters and storages, distributed energy generators, and electricity/heat storage units for an optimal scheduling of MG, including technical and economic ties between electricity and natural gas systems. The deployed algorithm was developed based on AC power flow, while the deployed model respected reactive power and voltage security constraints, allowing the MG system to minimize the operation cost. Moreover, several other works have been presented using these approaches. For example, the authors of [21] minimized the operating cost of MG using MINLP, while considering, as a constraint, droop controlled active and reactive power dispatch of AC side MG. The authors of [89] proposed an EM approach for MG under an operation system of transformer nominal operation and voltage security. Three objective functions, customer benefits, load leveling, and network losses, were studied.
Generally, the objective function and constraints deployed in linear programming methods are linear functions with whole-valued and real-valued decision variables. This family of approaches is often used for system analysis and optimization, as it presents a flexible and powerful method for solving large and complex problems, such as distributed generation and MG systems.
Dynamic programming methods are used to solve more complex problems that can be sequenced and discretized. The studied problems are usually fragmented into subproblems that are optimally solved, while the obtained solutions are superimposed to develop an optimal solution for the original problem [90]. Therefore, rule-based methods are generally used to implement the EM system because they do not require any future data profile to make a decision, thus making them more suitable for real-time applications. For example, the authors of [91] presented a rule-based EM system in which a rule-based algorithm was used to implement the priority of RES usage and manage the power flow of the proposed MG components. A nature-inspired optimization algorithm was used to optimize the MG system's operations for long-term capacity planning. The main goal of the proposed objective function was to minimize the cost of energy in MG systems as well as the deficiency of power supply probability. Other works have proposed rulebased methods to control and optimize the energy flow in MG systems. For example, the authors of [92] developed a control algorithm to provide power compatibility and EM for different resources in the MG. A real-time control system was used to experimentally validate the hybrid system in the MG. The results showed that the proposed approach provided stable operation of the MG subsystems under various power generation and consumption conditions. The authors of [93] studied a method to build the optimal EM for MG-connected system, which included the energy trading cost with the main grid and the battery aging cost. The authors used a dynamic programming algorithm to minimize the cash flow of the system while maximizing the power supply from the main grid.
Like other classical methods, dynamic programming algorithms can be considered as mathematical optimization methods, which can be used to simplify a complicated problem to simpler sub-problems for being solved in a recursive manner. They are able to provide optimal decisions. However, they require high computational costs, which make them difficult to implement in embedded devises.

Heuristic and Metaheuristic Approaches
Heuristic and metaheuristic approaches are used in many disciplines, such as in telecommunications and transportation systems. Recent studies have developed EM approaches for MG systems. For instance, the authors of [94] introduced a heuristic method for the optimal operation and EM of DC MG systems. The studied problem was formulated in the form of a single-objective optimization problem by focusing only on cost minimization. The authors of [95] proposed a metaheuristic based system by integrating the Harmony search algorithm and the enhanced differential evolution. To ensure that the power consumption did not exceed a fixed threshold value during peak periods, multiple knapsacks were used, and the proposed system outperformed the existing metaheuristic techniques in terms of cost and peak-to-average ratio. The authors of [96] proposed an economical model for energy storage system together with a real coded-genetic algorithm model for MG systems operating in a grid-connected mode. The developed algorithm maximized the present cost of energy storage system over its lifespan based on its capital, energy arbitrage revenue, operation cost, and maintenance cost. The authors of [97] proposed an optimal EM system for a grid-connected MG system based on the genetic algorithm, which considered the electricity price, power consumption, and uncertainty of RES generation. The work showed that particle swarm optimization method is more efficient in term of finding the best solution of the studied optimization function in comparison with genetic algorithm and combinatorial particle swarm optimization. A deterministic EM problem was solved by the authors of [98] via the multi-period gravitational search algorithm. The authors of [99] used a multi-objective particle swarm optimization algorithm to solve the EM system problem, which was considered as a multi-objective problem. However, the authors of [13,100] solved the EM system problem as a single-objective problem using particle swarm optimization-based algorithms. A metaheuristic approach for MG configuration in green data centers was presented by the authors of [101]. An optimization model was presented that considered the electricity costs and greenhouse gas emissions associated with all components of the MG systems, as well as their interactions. The model was applied to a real scenario of a data center with a given load demand in a specified environment. The authors calculated the degradation costs and the operational cost based on a system lifetime of 20 years. The developed model ensured good-quality MG configurations for different tradeoffs of cost and sustainability. Another work, presented by the authors of [102], combined an intelligent expert system fuzzy logic and a metaheuristic algorithm Grey-Wolf Optimizer. The proposed approaches solved the economic and environmental optimization problems of the MG systems by considering the uncertainties of RES and fluctuation in the power demand. In addition, a monitoring technique was developed with the fuzzy system to evaluate the input parameters to control the battery charge/discharge cycle, taking into account the economic aspect of the Grey-Wolf Optimizer optimization problem. The battery storage system operated by tracking the local generation costs of the installed MG and the total costs of the battery storage, which increased the possibility of charging the storage system at low costs during off-peak times. A metaheuristic home energy management system was studied by the authors of [103]. The authors evaluated the performance of the home energy management system using three metaheuristic opti-mization techniques: Bacterial foraging optimization, the Harmony search algorithm, and Enhanced deferential evolution. The objectives were to minimize the energy consumption, electricity cost, and reduction in peak-to-average ratio while maximizing user comfort. The obtained results showed that a tradeoff between user comfort and cost exists for the control constraints. In terms of cost, the results showed that the Harmony search algorithm performs better among other techniques. Another new interesting work, presented by the authors of [104], used a metaheuristic-based vector-decoupled algorithm to balance the control and operation of a hybrid MG system in the presence of stochastic renewable energy sources and the electric vehicle charging structure. The proposed control method ensured the stability of both frequency and voltage levels during the high-pulsed demand conditions and severe conditions of islanding operation mode together with the variability of RESs production. The presented results exposed the effectiveness and robustness of the proposed method to manage the real and reactive power exchange between the installed DC and AC buses of the MG within acceptable voltage and frequency variability.
Generally, heuristic optimization approaches use exploratory methods, in a reasonable time, to solve the optimization problems. However, they are unable to assure optimality of the obtained results [105]. The metaheuristic approaches are efficient and popular methods that are used for control and EM in the MG system. Several works in the literature that have analyzed the performance of these approaches. In some works, the metaheuristic control has been coupled with other control approaches in order to benefit from the performance of both approaches [106,107].

Artificial Intelligent Methods
Artificial neural networks are examples of artificial methods. They are considered as stochastic methods, which could be used to solve optimization problems for system having random variables. For MG systems, RESs have a variable nature caused by the weather conditions, which affect the power generation. As example, the authors of [108] presented an expert system for EM in MG systems using neural networks in order to predict the power generation of the installed RESs. The authors of [109] proposed a mathematical model for a smart load management in a standalone MG system. The studied loads were modeled by neural networks, and a predictive control was used to manage the energy according to predicted load variation. The authors of [110] presented an EM system for an MG system connected to the utility grid with the main objective of maximizing the use of renewable energies while minimizing the carbon emission. Two neural networks were used to model the proposed EM system using evolutionary adaptive dynamic programming and learning concepts. For the deployed neural networks, one was used for the management strategy and the other was used to check the optimal system's performance. The authors of [111] used a neural network to control a bidirectional rectifier/inverter. A dynamic programming algorithm was implemented and was trained using back propagation through time. The deployed neural networks showed a high ability to trace rapidly changing reference commands for frequency and voltage and satisfied control requirements for a faulted power system. The neural network controller used in this work was performed and studied under typical vector control conditions. The authors of [112] proposed a Lagrange-programming neural networks method for an efficient control and management of MG system with the main objective to minimize the overall cost of MG. In this work, the load was classified into different categories of controllable load, thermal load, price sensitive load, and critical load, while variable neurons and Lagrange neurons were combined to obtain optimal scheduling of MG operation. Mainly, neural networks can control, optimize, and identify system's parameters in online or offline applications. Unlike the previous approaches, neural networks can solve problems with nonlinear data in largescale MG systems because of their ability to solve the system's stability via self-learning and prediction capabilities [113,114].
MAB control approaches are generally used in MGs because they are decentralized while allowing multiple interacting agents to follow their specified rules and goals and to perform autonomously dedicated functions [115]. The principal element of MAB methods is the agent, which can be a virtual or physical entity situated in a specified system (e.g., buildings, MG). It is capable of autonomously reacting depending on the changes of the system's environment [42,116]. The authors of [117] applied a comprehensive description about different optimization techniques to EM and a comparison with other techniques was realized including MAB. The authors of [118] presented an EM based on the differential evolution algorithm, developed in JADE (Java Agent Development Environment) for grid outage. The proposed MAB approach showed its efficiency in minimizing the load's uncertainty as well as the generation costs from the intermittent nature of RES generation. The approach also considered the price variation in the utility grid, and the critical loads were considered while selecting the best solution. The authors of [119] proposed a fault-tolerant multi-agent control approach for coordinated energy and comfort management in integrated buildings and MG systems. Several cooperative agents were presented and trained in order to reach a global coordination, to satisfy related constraints, and to meet the system's objectives. The integrated buildings and MG systems were mathematically formulated as a multi-objective optimization problem, which was solved under different operating conditions. Other interesting research works, which have considered the MAB control approaches for EM in MG systems, are presented by the authors of [120][121][122]. Multi-agent systems offer the opportunity to implement more than basic control. They have three key features, namely reactive, proactive, and social abilities. From their characteristics, the agent technology is promising for the implementation of flexible, scalable, and distributed systems [123,124]. The usage of MAB method is rapidly growing in power systems, especially for EM in MG systems. MABs, combined with system modeling, make the arrangements of MG units autonomously directed making the scheme more intelligent and protective. The deployment of MAB control in the MG system considers each agent as an intelligent unit, which can communicate with their neighboring agents in a collaborative way to determine future control actions to achieve the common objective. The communication with neighboring agents requires the deployment of advanced ICTs in order to benefit from the advantage of such approaches.
Ant Colony Optimization (ACO) is one of the more commonly used methods for EM in MG systems due to its flexibility for specified constraints, low computational time and complexity, and ease of implementation. This classical method is inspired by the behavior of real ants to search for good solutions to a given optimization problem. It is a simple computational agent that converts the optimization problems into the problems of finding the shortest path on a weighted graph. The authors of [125] used an AOM method for EM in demand side management. The authors first designed an EM controller model using multiple knapsack problem and applied an ACO approach to obtain a viable solution for the designed objective function. By simulation. the authors attempted to justify that the ACO works efficiently in terms of electricity bill reduction and the minimization of peakto-average ratio while considering user satisfaction. Another ACO method was developed by the authors of [126], who investigated a combined cost optimization scheme in order to minimize both operational cost and emission levels while satisfying the MG's load demand. The proposed technique was compared with two other techniques, Lagrange and Gradient, to evaluate the proposed method performance. Mainly, other optimization methods based on AI have been used in the literature for EM and optimization problems. Particle Swarm Optimization was presented by the auhors of [127] for EM fuzzy controller design in dual source propelled electric vehicles. A systemic analysis of the power in energy storage was established by a mathematical model of EM problem.
Despite the efficiency of the abovementioned methods, still real-time and predictive control approaches are required for intelligent energy management in smart MG systems.

Other Interesting Approaches
One of the more interesting approaches for EM is proactive control. The principal of this approach is a mixed-integer optimal control problem that can be presented as a mixed-integer nonlinear programming problem [128]. The problem consists of finding optimal rules for a set of binary and continuous control variables that minimize the future predictable cost of the system over the time horizon. The proactive control is an "operationoriented measures" scheme that makes the system capable of dealing with the unfavorable condition for the system operation. The authors of [129] presented an MG proactive control approach to manage the adverse impacts of extreme windstorms. When alerts were received for the forecasted windstorm, the approach found a conservative schedule of MG with the minimum number of vulnerable branches in service while the total load was served. The conservative schedule ensured the MG normal operation prior to the windstorm while reducing the MG vulnerability at the event arrival. This method increased the benefits for generation reschedule, conservation voltage regulation, network reconfiguration, and optimal parameter settings of droop-controlled units. The authors of [130] discussed unified resilience evaluation and the operational enhancement approach, including a procedure for assessing the impact of severe weather on power systems. The proposed approach aimed to mitigate the cascading effects that may occur during weather emergencies. Another work, presented by the authors of [131], studied the installation of a battery energy storage system with a PV system in a hierarchical trans-active EM approach in order to reduce consumer's electricity bills. A cost-benefit analysis approach was developed for proactive houses which combined PV units and battery storage systems. The developed control algorithm controlled the charge/discharge cycle of the battery based on an economic benefit analysis in real-time electricity rate and battery cost to give an exact idea of returns and yearly savings to consumers on their investment. The performance of this method can be enhanced when a proactive system is managed using predictive approaches. The authors of [101] compared reactive feedback control and Model Predictive Control in terms of energy consumed, energy error, and management effort for a given data center. The work proposed a feedback control strategy based on the data center model in order to optimize the quality of service, the energy consumed, and the management effort. It is perceived from the literature that the concept of proactive control for energy management in MG systems is rarely used. The concept is very interesting for control-based predictive decisions. Due to the development of information and communication technologies, especially microcontrollers, proactive control can be improved in future researches for EM in MG systems. The method is capable of making the system more preferment with the existing disturbances system operation.
Another interesting control approach is the FL. Like neural networks, the FL method is considered as one of the nonlinear techniques that are used for power regulation with power electronics-based converters. This intelligent control consists of a fuzzifier, rule evaluator, and a defuzzifier, while a set of rules known as rule-based and database is considered for the control strategy deployment. Mainly, the FL method is used to control space vector PWM based three-phase rectifier and is used with intelligent techniques-based Droop-Control to manage multiple distributed energy DC-MG systems [132]. For instance, the authors of [133] proposed a voltage control technic using an FL-based centralized controller with gain scheduling control for DC-MG with an electric-double-layer-capacitor as energy storage. A fuzzy-based control strategy, proposed by the authors of [134,135], is capable of determining small voltage and frequency steps regulations to improve the performance of Droop-Control by diminishing the mismatch in the common bus without heavy communication links. This work considered the frequency and voltage as uncoupled variables and then corrected each one separately by considering that the voltage is a local variable and the frequency is a global variable of the system. The proposed fuzzy method changed the frequency and the voltage reference value in the droop equation of the Voltage Sources Inverters to correct its variation. The authors of [102] used FL and a metaheuristic algorithm known as Grey-Wolf optimization to optimize the interconnection between multiple MG systems. The main aims of this method were to minimize both the costs for the generator units and the emission levels of the fossil fuel sources. Several works have studied the use of FL for energy management in MG systems. The authors of [136] deployed a mode transition strategy to smooth the mode variation and a fuzzy controller was used to determine the operation mode of coupled MG system with 20 different gridconnected and standalone MG systems. The FL was also considered as a deterministic algorithm for frequency and voltage regulation in both primary and secondary control levels and was characterized by low computational cost and easiness of implementation. In the literature, FL is the most deterministic approaches used together with PI controller. Some FL methods can be classified as AI methods.

Comparison of Control Approaches for MG Systems
The choice of an EM approach is an essential requirement for the reliable and stable operation for MG system. Depending on the characteristics of the deployed system (e.g., topologies, operation modes, structure), an EM can be selected. However, the deployment of an approach does not signify that the others are not reliable, and the studied constraints and the fixed objective of the control strategy are the main issue in order to identify the utility of the deployed method. In the rest of this section, the advantages and the disadvantages of different control techniques are presented (see Table 4). Table 4. Brief comparison of control approaches.

Control Approach Application Advantage Disadvantage
Model predictive control [85,137,138] •  A good approach must consider the stochastic nature of different control parameters, the installation cost, the components lifetime, the distributed resources, and the reliable and safety operation of the MG system. In fact, the deployment of an EM control strategy requires the classification of the whole system into different levels, while each level should operate by coordinating with the other levels from the sources (e.g., maximum power point tracking) to the end consumers, which can be a local consumer or a neighboring MG consumer. Nowadays, smart components are installed for each source and for each MG system, which can cooperate between them due to the new ICTs. Especially, the actual inverters can execute different control strategies from the source power regulation to the interconnectivity to the utility grid or to the neighboring MG. In addition, the inverters can be installed for a large scale of MG systems, creating a cluster of data and electricity exchange, while these inverters could be connected to the internet in order to store the historic data in the cloud. Mainly, the main objective function for each inverter is ensuring continuous power supply to the consumers without considering the lifetime of the battery storage system or the cost of electricity. In this context, the development of an EM control strategy that considers the electricity price variation and minimizes the battery C/D cycle is required. These two issues allow the maximization of the system profitability by minimizing the electricity bill and avoiding a frequent replacement of battery storage in a MG system. The main idea is to develop an intelligent and predictive control strategy that can optimally control the distributed resources in the MG by considering multiple constraints and objective functions at the same time.

State of the Art Synthesis and Our Contribution
Control strategies generally use single-objective function procedures (e.g., maximizing the quality of the services). Without considering different operating constraints, these procedures are easier to implement and to deploy in real-sitting scenarios. Moreover, control strategies, which take into consideration only the energy availability within MG components (e.g., energy sources, storage devices, traditional electric grid), could be implemented by simple algorithms. These algorithms implement procedures that switch, at each time, from RES either to storage devices or to the TEG. For instance, actual commercial inverters are able to efficiently manage the interconnection between RESs, energy storage systems, and the utility grid by incorporating a single-objective function. In particular, the MG system's EM takes into consideration only the availability of the electricity for being supplied to buildings loads. The inverter can use either batteries or the utility grid once without taking into account other parameters, such as the actual electricity cost as well as battery C/D cycles. However, in a limited time, high battery C/D cycles could decrease their performance, which impact on the profitability of the system. In other cases, controllers can interact with energy sources generators (e.g., solar, wind) in real-time in order to limit the power generation (LPPT). The aim is to ensure the quality of the electrical services (e.g., frequency, voltage), and consequently, to minimize the profitability of MG system's components. Despite their advantages, they could have negative impacts on the batteries' lifecycle and system's profitability. Therefore, context-awareness principles and predictive analytics could be exploited for developing context-driven control approaches.
The current state of knowledge aims to develop context-driven control approaches for the energy management of MG systems in the context of smart buildings. Mainly, a predictive control approach, named MAPCASTE (Measure, Analyze, Predict, foreCAST, and Execute) [37], is developed and deployed in real-sitting scenarios for energy management in MG systems (see Figure 9). Unlike the control approaches from literature, MAPCASTE considers multiple-objective functions, which take into consideration battery C/D cycles as well as electricity price forecasting [37]. The main aim is to ensure, in an optimal way, the continuous electricity supply from different installed sources (e.g., RESs, batteries, TEG) to building's services. The proposed approach is based on predictive control models, which are able to generate a sequence of future control actions over a prediction horizon.

State of the Art Synthesis and Our Contribution
Control strategies generally use single-objective function procedures (e.g., maximizing the quality of the services). Without considering different operating constraints, these procedures are easier to implement and to deploy in real-sitting scenarios. Moreover, control strategies, which take into consideration only the energy availability within MG components (e.g., energy sources, storage devices, traditional electric grid), could be implemented by simple algorithms. These algorithms implement procedures that switch, at each time, from RES either to storage devices or to the TEG. For instance, actual commercial inverters are able to efficiently manage the interconnection between RESs, energy storage systems, and the utility grid by incorporating a single-objective function. In particular, the MG system's EM takes into consideration only the availability of the electricity for being supplied to buildings loads. The inverter can use either batteries or the utility grid once without taking into account other parameters, such as the actual electricity cost as well as battery C/D cycles. However, in a limited time, high battery C/D cycles could decrease their performance, which impact on the profitability of the system. In other cases, controllers can interact with energy sources generators (e.g., solar, wind) in real-time in order to limit the power generation (LPPT). The aim is to ensure the quality of the electrical services (e.g., frequency, voltage), and consequently, to minimize the profitability of MG system's components. Despite their advantages, they could have negative impacts on the batteries' lifecycle and system's profitability. Therefore, context-awareness principles and predictive analytics could be exploited for developing context-driven control approaches.
The current state of knowledge aims to develop context-driven control approaches for the energy management of MG systems in the context of smart buildings. Mainly, a predictive control approach, named MAPCASTE (Measure, Analyze, Predict, foreCAST, and Execute) [37], is developed and deployed in real-sitting scenarios for energy management in MG systems (see Figure  9). Unlike the control approaches from literature, MAPCASTE considers multiple-objective functions, which take into consideration battery C/D cycles as well as electricity price forecasting [37]. The main aim is to ensure, in an optimal way, the continuous electricity supply from different installed sources (e.g., RESs, batteries, TEG) to building's services. The proposed approach is based on predictive control models, which are able to generate a sequence of future control actions over a prediction horizon. However, in order to carry out the MAPCASTE, several forecasted inputs values are required, mainly the power production/consumption and batteries SoC. This requires an advanced metering infrastructure, which makes it possible to measure and predict all inputs values. Therefore, an MG was deployed together with an IoT/Big data platform in order to conduct experiments and validate developed models. The deployed MG system contains RESs and battery storage systems, which are connected together with the TEG in order to supply the electrical energy to the building's loads (e.g., lighting, ventilation). The IoT/Big data platform was developed and deployed in order to allow measuring and forecasting RESs power generation, loads consumption, and batteries SoC. However, in order to carry out the MAPCASTE, several forecasted inputs values are required, mainly the power production/consumption and batteries SoC. This requires an advanced metering infrastructure, which makes it possible to measure and predict all inputs values. Therefore, an MG was deployed together with an IoT/Big data platform in order to conduct experiments and validate developed models. The deployed MG system contains RESs and battery storage systems, which are connected together with the TEG in order to supply the electrical energy to the building's loads (e.g., lighting, ventilation). The IoT/Big data platform was developed and deployed in order to allow measuring and forecasting RESs power generation, loads consumption, and batteries SoC. Sensing/actuating components with a control card are installed in order to monitor and manage the whole MG system, offering the possibility to test the developed control techniques in real context [37,152]. Moreover, based on this review, ongoing works focus on the development of smart converters. In fact, the actual commercial inverters offer the possibility to manage the power flows between different power sources, loads, energy storage systems, and utility grids with high performance. However, these inverters are limited generally to a single-objective function, the satisfaction of the load demand, without considering other operating constraints, such as the electricity price and the battery state of health. Moreover, the integration of new IoT/Big-data technologies to the actual inverter has improved the performance of the system to control and predict the suitable actions for EM and control. Mainly, the integration of machine-learning algorithms is required to analyze the data and to predict the actions for EM in MG systems. In this way, the development of smart inverter has enhanced the possibility to integrate multiple-objective functions and operating constraints that can be integrated in the EM approaches. Therefore, the deployment of predictive control strategies in real scenarios requires the use of openaccess power converter. For that, we are deploying our proper power inverter in order to have the ability to conduct real testing of predictive control strategies with specific constraints and multiple-objective functions. The deployment of smart inverter offers the possibility to create MG networks using IoT/Big-data technologies. In this context, a platform for MG2MG energy and data exchange will be developed based on the predictive control deployed in the smart inverters.

Conclusions
The energy management and optimization control in MG systems are becoming a multiple-objective "management/optimization" function to be satisfied by solving simultaneously technical, economic, and environmental problems. Therefore, several approaches (e.g., exact, stochastic, and predictive) have been proposed for energy management. These approaches were chosen based on their practicality, reliability, and resource availability in MG environment. This work reviewed recent research work related to EM in MG systems. In particular, we focused on different control approaches that have been proposed to efficiently operate MG systems, including centralized, decentralized, and hierarchical management structures. A comprehensive description of control and optimization methods was highlighted, particularly to identify the most common and effective method for EM in MG systems. Predictive control was a good candidate, since it integrates optimal control and multivariable processes and is a flexible control scheme that allows the easy inclusion of system constraints and optimization functions. It is robust against uncertainty and powersmoothing problems. Thus, multiple control objective and constraint functions can be implemented for the same control strategy. However, despite the power of these predictive control techniques, their deployment in real-sitting scenarios requires a holistic platform that integrates MG components together with all equipment for measuring and predicting important input data. With recent technological advances in microprocessors, data analysis, and machine learning, predictive control can be seen as a promising alternative for energy management in MG systems. Funding: This research was funded by USAID under the PEER program, grant number 5-398. It is also partially supported by HOLSYS project, which is funded by IRESEN (iresen-inno-projet-2020-2022).

Conflicts of Interest:
The authors declare no conflict of interest.