**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.

**Figure 6.** Objective functions constraints, and optimization methods for optimum operation of MG systems.

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.

#### *3.1. 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–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 CO2, 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 CO2 emission and that, by comparing these two elements of CO2 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 *MWp* 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 CO2 mitigation. The authors considered the energy payback time to estimate the CO2 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–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.

#### *3.2. 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.

**Figure 7.** Control approaches for energy management systems.

**Figure 8.** MG and EM system specification and underlying construction steps.

#### 3.2.1. 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–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.

#### 3.2.2. 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.
