Energy management in the smart grid: State-of-the-art and future trends

Integration of distributed generations that fluctuate widely (such as Photovoltaic panels, Wind power, Electric Vehicles and Energy Storage Systems), poses a chance to the stability of power technology and distribution structures. However, the primary reason is that the electricity ratio between supply and demand may not be balanced. An extra or scarcity inside the production or intake of electricity can disrupt the system and cause critical problems which include a drop/rise in voltage and, under difficult conditions, power outages. The use of Energy Management Systems can effectively increase the balance between supply and demand and decrease peak load throughout unplanned durations. The energy management system is capable of not only sharing or exchanging energy between the different energy resources available, but also of economically supplying loads in a reliable, safe and effective manner under all conditions necessary for the operation of the power grid. This work outlines the structure, goals, benefits and defies of the energy control system via an in-intensity analysis of the distinctive stakeholders and participants engaged on this system. A detailed essential analysis of the functioning of distinct programs which includes Demand Response, Demand Management and Energy Quality Management implemented inside the electricity management gadget is presented in this review. It also summarizes quantifications of the various strategies of uncertainty. It includes as well a comparative and an important assessment of the primary optimization techniques which are used to obtain the extraordinary goals of energy management structures while at the same time meeting a wide range of requirements.


Introduction
Since CO 2 emissions are the main cause of global warming, the best way to tackle it is to focus on the sectors that have contributed most to these emissions, namely transport and power generation. Switching to Renewable Energy Sources (RES) with the electric vehicles is apparently the best option toward a sustainable future. In addition, changing the traditional fuel based transports with electric vehicle transportation, Plug-in Hybrid Electric Vehicles (PHEVs) and Plug-in Electric Vehicles (PEVs), as well as integrating into the current network a Battery Energy Storage Systems (BESS) or an Energy Storage Systems (ESS) are another possible solutions to address the exponential growth of greenhouse gas (GHG) emissions. Renewable energies are distinguished by their variable and intermittent production. Using a combination of several RES, as well as the ESS and the back-up sources, the intermittent nature of RES can be avoided.
However, this intermittency can significantly change a voltage profile of the system and interfere with conventional on-load tap changer control systems, and can also have a negative effect on the performance of the power grid. Therefore, in addition to GHG mitigation, the technologies are also imposing many defies, including uncoordinated grid parameters, raised system complexities, intermittent renewable generation and high PEV price requirements, that ultimately lead to serious problems like power quality issues, energy imbalance, resilience, loss of reliability, system security, and regulatory issues such as unequal distribution of benefits to consumers. 1 In addition, with the development of renewable sources there has been a shift from a traditionally passive to an active distribution system. Therefore, the flow of energy between sources must be controlled when there is more than one energy source and a storage system. In order to ensure that the potential of new sources and new types of loads on the electricity network is exploited to the maximum and that their negative impacts are minimized, to ensure load continuity in all conditions and to improve the stability of the electricity network, an Energy Management System (EMS) is very important. The IEC 61970 standard of the International Electrotechnical Commission has defined an EMS as "a computer system that comprises a software platform providing essential support services, and a set of applications providing the functionalities necessary for the efficient operation of power generation and transmission facilities to ensure security of energy supply at minimum cost". Energy management in the Smart Grid (SG) ensures that the stability between supply and demand is maintained, while respecting all system constraints for economical, reliable and safe operation of the electrical system. It also includes optimization, which ensures a reduction in the cost of power generation. Thus, the EMS manages and reduces to a minimum the quantity and price of energy needed for a particular application by grouping all systematic procedures together. Although energy management in a distribution system helps improve system performance, it also presents limitations and challenges, such as confidentiality on the customer side, operations in a large system, regular system upgrades, and EMS reliability issues. A comparative analysis of advantages and disadvantages of EMS is presented in Table 1.
Our project focuses on the energy management system of the SGs. in order to have a clear vision, we opted for this review which can help us understand more clearly the role and application of each EMS-based method. Therefore, it will guide us to define our problem. This paper deals with the following aspects: General description of the EMS in the SG and its different aspects; Roles and responsibilities of the various elements involved in the EMS as well as a specific analysis of the DER's behavior; Critical analytical studies on uncertainty management, demand response, demand side management and power quality management; Comparative and critical analysis of approaches to EMS solutions. Section 2 gives the definition and advantages of the SG. Section 3 presents the structures, advantages and drawbacks of EMS through an intensive analysis of the distractive stockholders and participants engaged in the system. Section 4 outlines the methods that should be considered for the EMS which includes DR, DSM, and PQM. Section 5 summarizes various approaches to EMS solutions. Finally, Section 6 presents the concluding remarks.
Another key benefit of SG technology is that real-time, two-way communication permits faster recovery of power service after a blackout. Rotating power outages can cause a damaging domino effect that negatively impacts banking, communications, manufacturing, traffic and security. 3 The system uses digital sensors, smart metering techniques, and intelligent control systems equipped with analytical tools for automating, controlling and monitoring the bidirectional flow of electricity from power outlet to plug during the operation.
Since smart meters play an important role in two-way communications between the utility and the users' premises, they are becoming one of the most attractive and vulnerable targets for attackers. 4 Data integrity attacks are a category of cyber-attacks. Hackers can access the supposedly protected data and inject false information into the grid measurements, which cannot be easily detected by existing operational practices. 5 Luo et al., 6 shows the impact of data integrity attacks on the accuracy of four different load forecasting models (fuzzy interaction regression, supporting vector regression (SVR), multiple linear regression and ANN). The results shows that the SVR model is the most robust, while the fuzzy interaction regression model is the least robust among the four. Nevertheless, all models fail in providing satisfactory predictions when the scale of the data integrity attacks is significant. However, for both the load forecasters and the broader forecasting community, this represents a serious challenge. To address this challenge, a recent case study proved that the SVR results were the most robust of the four load prediction models, when data integrity was attacked. [5][6][7] To limit the threat of a data attack or a catastrophe, the SG uses not a single plant with a high production, but a large number of small discrete distributed plants. If this ever takes place, since the SG is a self-regenerating system, it will be quickly restored, automatically, through the isolation of the specific line and reconnecting the power supply. To achieve this, a smart switches must be used, for example, a digital system for rapid protection over short circuit conditions in transformer windings. 8 The Control Layer, the Application Layer, and the Physical Power Layer are three different layers that form the SG System In this work, control and management are at the center of our concerns. As energy management within the SG is seen as an essential element in improving renewable energy consumption and energy efficiency.

Energy management system
In 1960, the evolution of the Energy Management System (EMS) began as a control center and became known as the Energy Control Centre (ECC) in 1970. It was also renamed Supervisory Control and Data Acquisition (SCADA-EMS) when advanced computerized SCADA appeared in 1990, then it eventually developed to a system in real time called EMS that encompasses different techniques of control such as Demand Side Management (DSM), Load Control (LC), and Distribution Management System (DMS). 9 The EMS's goal is to distribute the different energy sources optimally among consumers, while introducing sustainable energy supplies in a way that does not affect the reliable, safe and secure operation of the network. In addition, it is also able of monitoring, supervising, controlling and optimizing consumers, as well as transmitting, distributing and generating facilities. This system is suitable for SCADA real-time applications, controlling, power dispatching, and programming, as well as transmitting safety management. EMS is getting more complex as the grid evolves with the integration of Plug-in Electric Vehicles (PEVs), Energy Storage System (ESS), RES, high energy buildings, and many other factors. Figure 2 illustrates the annual publication growth, marked by an increase in the rate of publications over the period from 2012 to 2020. We note that there is an upward trend in the number of publications, even if this number is more or less constant over some years, as well as an improvement and development toward a common programming of different modes of management and control aimed at improving the efficiency and quality of the network.
An EMS has many objectives: technical, economic, techno-economic, environmental, and social-economic. Most EMS research contributions focus on economic objectives. These objectives concern the total cost of operating energy, royalties, profit maximization for aggregators, and so forth. If economic objectives are set, technical aspects are also taken into account, because if we1 do not consider any of these technical constraints, the optimization of the EMS may give an optimal result in terms of economic performance, at the risk of causing a power outage, a power failure, or damage to appliances operating in a distribution network. The technical focuses of the EMS comprise energy quality, transformer degradation and equipment performance; and addressing them leads to better system performance, improved life expectancy, improved power quality, and reduced maintenance and down-time. However, uncoordinated integration of RES, PEV, and ESS can divert the system off its expected performance; e.g. charging and discharging PEV in an uncoordinated supply line can cause heat stress to the distribution system and transformer, while uncoordinated implementation of RES can produce problem in reactive power which causes deviations in voltage and other problems. 10 In another hand, the environmental objectives cover the reduction of greenhouse gas (GHG) emissions, where different modes of fossil fuel and renewable sources have been planned, in order to reach a lower carbon emission impact. Socioeconomic goals are regarded when social processes form the economic activity that comprises various programs where aggregators, agents, network operators and end-users are involved in order to reach better economical results. 11,12 Energy management field contains some interesting topics, which may be classified under the following categories: the intelligent transmission system, and the intelligent distribution system and the demand side.
Energy management of transmission system central optimization remains an important approach. An EMS's centralized structure can be described as a central controller comprising a highly efficient computing system along with secure, dedicated network communication for managing energy use. 13 This controller can either be an aggregator or an utility, that gathers all information, like energy consumption pattern of the load/consumer, energy production of the DER, and so forth, of each node to run optimization programs toward achieving their goals, for an effective operation. 14 In this area, contributions focus on how solar and wind energy could contribute to the large-scale use, and also on the potential of demand-responsive flexible loads (DR). As an example, for energy systems including large-scale wind energy, a new optimal planning method considering DR is proposed. This methodology allows the joint allocation of demand resources and energy so that fluctuations in wind energy loading and production can be limited. Moreover, a study was done on the effect of EVs and RES integration in SG. A binary version of the fireworks algorithm is used to efficiently engage and program thermal units and EVs and RES.
As to energy management of the intelligent distribution system and the demand side, autonomous and cooperative operation are two major aspects of optimization, as several kinds of rational structures are operating, such as distributed energy sources, micro-grids (MG), energy storage, smart homes and buildings, EVs, plant energy management system (PEMS), and so forth. Distributed optimization and game theory contributions are largely reported. As an example, power sharing between interlinked MGs promises improvement of the economics and reliability in the operations system, a distributed energy management approach for the interlinked operations of MGs using combined heat and power generation is proposed. It is essential to maximize local consumption of renewable energy during operation. At the user side, challenges and opportunities can be identified when introducing RES and EVs in the Smart Home. Many practical strategies with different demand profiles are presented, incorporating renewable energies which might be used for charging EVs.

Methods to be considered for the implementation of the EMS
In this section, we shed light on uncertainty management techniques that contain two types of uncertainty parameters: technical parameters and economical parameters. We have also reviewed the characteristics, applications and assumptions of each uncertainty handling method. Quantification methods and other programs implemented in an EMS such as DR, DSM and PQM are also discussed.

a) Uncertainty management techniques
New technologies such as PEV, the integration of RES, Demand Side Management (DSM), energy storage facilities and DG sources characterize the emerging power system. As a result of these technologies, the grid is becoming smarter. However, there are still several uncertainties, like generation uncertainty caused by RES's intermittent nature, expected load uncertainty from random load nature, or generation units or any unexpected dispatch of transmission equipment. Besides, the behavior of the owner of the PEV in terms of pricing or spilling on the power grid is a source of uncertainty. Those uncertainties complicate the accurate forecasting or estimation of consumption and generation, which impacts that system's safety and reliability. According to the analysis, two categories of uncertain parameters exist, those that are technical and those that are economical, as shown in Figure 3. 15 The technical parameters can then be divided into topological and operational parameters. The topological parameters comprise data on disturbance of a line or a production unit while the operational ones include informations on demand and renewable generation. When, economical parameters are subdivided into macroeconomic parameters, which cover the cost of production, and microeconomic ones, that involve financial policies and regulations.
Modeling uncertainties were carried out by various methods during the implementation of the EMS (see Figure 4). As shown in the figure, the probabilistic nature of power system requires stochastic methods to assess the reliability and performance of the system. Those methods are the most effective way to deal and analyze uncertainties, in which production is predicted based on a series of random values following a probabilistic distribution. For uncertainty management at the EMS, the Monte Carlo (MC), Markov chain Monte Carlo model (MCMC), and Markov chain model are the most commonly used methods. Monte Carlo model has been used in previous studies, [16][17][18][19] in order to manage MG uncertainty, storage capacity, reliability, PEV load profile and to determine load power demand and power quality. As for the Markov chain model, it is a randomized, memory-less process, capable of predicting a next state according to the current one.
Zhou et al. 19 propose a solution for managing uncertainty in the PEV charge/discharge model based on a predictive capacity model. They take into account eight separate uncertainties, to obtain an accurate charge/discharge prediction. EMS robustness refers to the ability to resist modifications while maintaining the same configuration. We can define a robust EMS (REMS) as a system capable of effectively managing uncertainties, in other words, capable of modeling all uncertainties with high accuracy, thus including them appropriately in the system.
Valencia et al. 20 presented a robust EMS based on an MPC framework. A fuzzy prediction interval model is used to predict the available energies of wind energy sources. The results show that this model was robust to uncertain wind energy variations, although the operating costs increased slightly due to extra reserves additions.
In Rezaei et al., 21 they propose a Robust Energy Management for the island MG to deal with frequency variation resulting from RES generation and load shifting. Information lack decision theory (ILDT) was used to manage MGs uncertainties which was solved with the MILP framework. The researchers also propose many other types of methods for dealing with uncertainties, such as robust, fuzzy, scenario-based methods, unscented transformation, linearization, probabilistic method, Monte Carlo method, Gaussian mixture model, estimation distribution and stochastic inventory theory, to model uncertainties in an EMS. Table 2  summarizes the features, the applications and assumptions of each method.

b) Power quality management
Power Quality Management (PQM) can be defined as a process that provides solutions for minimizing impacts of internal and external disturbances/events which may affect a specific facility or process in terms of operating time or performance. It covers two categories of disturbances: variations and events. 49 While variations are evaluated and measured continuously, events generally occur unpredictably and require a tripping action for measurement. The main variations are: voltage slow variations, flicker, unbalance and harmonics. Most important events are: interruptions, fast voltage changes, troughs and swells.
Power quality distributed to users relies on the load and source at their premises. In an EMS, the traditional task was to deal with dispatching and scheduling, while power quality was dealt with another control layer. This traditional task was defined just by the optimal use and cost of energy, with no parallel monitoring of power quality. Due to the deregulation in the electricity market, the preservation of high power quality is extremely essential for the utility to attract/ retain clients.
Luo et al. 11 have suggested a DC microgrid for sustainable constructions using PEV batteries to control voltage variations, reach power stability in the DC microgrid and improve power quality in grid connected or island operation. Ovalle et al. 50 gave an optimum loading scheme for PEVs, ensuring voltage regulation and preserving customer benefits in a residential building through uncoordinated PEV fleet loading. Naidoo et al. proposed a new approach which estimates the symmetric components over noise and harmonic signal conditions with non-linear adaptive tracking of the amplitude, frequency and phase of a realtime non-stationary sine waveform using a simulation study and a hardware experiment. 51 The EMS itself is complex, and the implementation of power quality characterization module would complicate this task. However, combining PQM and EMS will improve network performance and provide a more cost-effective solution. c) Demand side management, demand response, and pricing policy Demand response and demand management are two main components of the EMS to improve the load profile of the system, efficiently using system assets and reducing peak demand. It is important to understand that DR and DSM are not the same thing, even though they are often used indifferently. From the user's point of view, the DSM is meant to increase flexibility. The application of DSM programs may vary from improving energy efficiency with better insulation materials to completely self-contained energy systems which respond to changes in demand and supply automatically. It could be implemented either via energy response (ER) or energy efficiency conservation (EEC) programs, or DR. 52,53 Some economic benefits are obtained through EEC programs by encouraging clients to give up a portion of their energy consumption. Which could be decreased by such actions as adjusting thermostat settings, 54 changing projects, and so forth. 55 In the other hand, DR refers to programs that encourage participants to reduce energy demand in the short term. These short-term "responses" are initiated by distribution system operator (DSO) or the transmission system operator (TSO), or they can be triggered with signal prices in the hourly power market. DR activations can last from a few minutes to a couple hours according to DR program, and can include  1 Robust model -It provides statistics with good performance for data from a wide range of probability distributions, especially for those distributions that are not normal.
They have been developed for several common problems, including estimation of location, scale and regression parameters. Energy trading cost for MG, day-ahead pricing, load control, dispatching of Energy storage -DR application in handling uncertainties of MG system can be neglected -They consider a constant parameters of the system. -They assume that there is a communication infrastructure in order to real-time control of MG. [22][23][24][25] 2 Fuzzy model -Suitable Fuzzy member ship function is applied to each parameter.
-Doesn't require an accurate mathematical model.
-Can operate with imprecise inputs.
-And can be more insensitive to disturbances than most non-linear controllers.
-It is tedious to develop fuzzy rules and fuzzy membership functions and fuzzy outputs can be interpreted in many ways, making analysis difficult. Load demand and Electric vehicle trip demand, energy management of hybrid systems, MG applications -Gravity technique is used to find the centroid of the distribution function.
-The recognition results were considered as the reference input of the fuzzy controller with further optimization of the membership function.
-They did not consider the impact of driving cycles.
-Taking into consideration the fuel cell power changing rate and battery SOC.
-The study can consider various uncertainties associated with the contingency faults, -Consideration of the evolution of prices per day, energy demand, production, and time of day in order to ensure that the grid was affordable.
-The entire system is considered as a stand-alone MMG system operated in both grid-connected and islanded modes, [26][27][28][29] 3 Scenario-based method -It's an effective method of recognizing weak signals, disruptive events or technological discontinuities and including them in long-term planning.
Wind speed, solar insolation, day ahead pricing, load power, case studies of energy management in MG or industry -Considering electricity demand response.
-Energy consumption costs for machines, workshops and factories can be saved through production scheduling.
-The electricity demand of machines can be shifted from peak to valley periods to reduce energy consumption costs.
-Consideration of both technical and economic uncertainty.
-It is assumed that the network is off-grid.
-The MG is able to provide all electrical power and heat for each building.
-Electric vehicles return to the parking lot at the end of the day and have no charge.
-The sources of energy production in buildings are studied assuming their initial capital is returned. 30,31 (continued) 4 Unscented transformation -Its most common use is in the nonlinear projection of mean and covariance estimates in the context of nonlinear extensions of the Kalman filter.
Electric vehicle batteries, scheduling photovoltaique power generation, estimation of batteries state of charge -Consider time evolution of state over time.
-Considering time capacity.
-Considering all input variables are independent.
-Taking into account uncertainties associated with load and wind power generation.
-Taking into account the correlation between uncertain input variables.
-Considering the uncertainties associated with load and wind generation [32][33][34] 5 Linearization -Work well for problems that are mostly linear.
work well if variable dependencies are not critical to performance.
make sense when doing soft constraint modeling, or linearizing fairly smooth parts of nonlinear problems to make them more easy to solve.
Load scheduling, energy cost, hybrid energy storage system applications, load power, power demand -Consideration of a smart power system with multiple load customers and one energy source.
-Assuming that the cost functions are increasing.
assuming that the cost functions are strictly convex. 35,36 6 Probabilistic method -The simplest sizing methodologies.
-These techniques are not necessarily the most suitable for finding the best solution.
-The techniques usually consider whether one or two system performance indicators need to be optimized to size the components of the studied system.
Renewable energy applications, real-time management strategies, sizing of battery system, Generation of power from RESs, Wind speed, solar insolation, load power -The uncertainty of data noise was not considered.
-The load is growing at exactly the same rate as the economic growth.
-The physical topology of the power system does not change dramatically within a short time, 37,38 7 Probabilistic Monte Carlo Method (MCM) -The computations can be very easily arranged to obtain uncertainty intervals with any degree of confidence.
-The uncertainty intervals are very narrow and specific considering very high confidence level which can be achieved.
-The resulting MCM uncertainty assessment is based entirely on correct true measurements above LDL and on the verified and best fitting Weibull distributions.
-A sophisticated computer program is required to find the most suitable Weibull distribution for continuous air quality monitoring data, and then to generate repeated pseudo-random observations from this distribution.
Energy control in MG, control load fluctuations, electricity pricing, load demand, energy trading cost, solar isolation -Considering the renewables uncertainty as inputs to MCS.
-The uncertainties of power load demand and power production from renewable generations are considered. 39,40 (continued) 8 Gaussain Mixtere Model (GMM) -It learns the representation of a multimodal data distribution as a combination of unimodal distributions.
-It attempts to find a mixed representation of the probability distribution of the multidimensional Gaussian model, thereby fitting a data distribution of arbitrary shape.
-The algorithms for optimizing the loss function for GMM are not so trivial, since it is not a convex function. Load power, energy cost, load demand, wind speed, generation of power from RESs -Fixed time interval consisting of single Days.
-Consider this load profile to be fixed over different days.
-Considering confidence and error trade-off for practical applications. 41,42 9 Estimation distribution -They are stochastic optimization methods that guide the search for the optimum by building and sampling explicit probabilistic models of promising candidate solutions. Wind speed, renewable energy applications, hybrid electric vehicles energy management, load demand and electricity price, dispatching of Energy storage -Numerical weather forecast is completely based on the forecast data.
-Taking into account thermal conditions.
-Considering the incentive payments as a function of peak intensity.
-Considering the full cycle driving condition of the vehicle and the optimal distribution of power system. [43][44][45] 10 Stochastic inventory theory -Its assumptions are far too simple and hence unrealistic.
-Because they are quite clear and rigid, there is very little scope for incorporating judgment, or extraneous factors into the model.
the results are more difficult to communicate than some of the more simple deterministic models.
-It allows these assumptions to be tested by a variety of techniques. energy cost, load scheduling, generation of power from RESs, dispatching of energy storage, electric vehicle demand -Stochastic models can be established to characterize the randomness in renewable power generation.
-The optimization considers uncertainties and probabilities as inputs. [46][47][48] switching off/reducing lights, regulating Heating, Ventilation and Air Conditioning (HVAC) levels, or turning off a noncritical manufacturing process. Storage and Production systems on-site could be useful as well for adjusting network loads. The main point to retain is that these are reactive, temporary measures which maintain the automatic and optimal functioning of the system and mitigate peaks or troughs of the demand and supply of electricity. DSM is any program that motivates an end-user to improve energy efficiency. The DR therefore belongs to this category too, but also permanent or long-term energy efficiency measurements like lighting retrofits, modernization of building automation and improvement of air-conditioning. Customer load profile is a very good guide for the implementation of demand management. It allows to control the action plan method to be applied. Leveling out customer load profile behavior will maximize the use of utility capacity and therefore decrease load factor. Usually this is achieved by switching certain customer loads from peak to off-peak periods. However, off-peak periods can also be increased so that the load factor can be reduced. In general, it is more practical for utilities to view the DSM in terms of overall load structuring objectives. The load form is the daily and seasonal power demand by time-of-day, day-ofweek, and season. In this context, we can identify six broad types of load shape objectives: load shifting, strategic conservation, peak clipping, flexible load shape, strategic load growth and valley filling. 56,57 Figure 5 shows these six objectives.
Peak clipping is the reduction of utility load at peak times. It may postpone a necessity for extra production capacity. The net effect is a decrease of both peak demand and total energy consumption. In general, this reduction is implemented either using end-use equipment from utilities or direct load control (DLC) of appliances. For example, in Valencia et al., 20 PEVs are considered as intelligent devices for the DSM, whose participation in the load shaping strategy can be programmed. The strategy is achieved by coordinating the charging and discharging of several domestic PEVs. While, their owners have the ability to choose the desired timing among the three given time zones for charging their PEV in function of their battery's state. As a result, both active power losses and peak demand are reduced.
Valley filling means putting in loads during off-peak hours. It might be particularly desirable whenever the long-term incremental cost is below the average electricity price. Usually, this is the case when there is under-utilized capacity that can operate on low-cost fuels. The net effect is an increase in total energy consumption, without increasing peak demand. Generally, this leads to the creation of new off-peak electrical loads that were formerly operated on non-electric fuels, like night-time recharging of electrical vehicles and thermal power storage. In Jian et al., 59 Khatiri-Doost and Amirahmadi, 60 a valley-filling strategy for large-scale centralized PEVs is presented, with a lower computational burden compared to other existing valleyfilling strategies. For Zhang and Zheng 61 demonstrated the PEV's ability to operate in G2V and V2G mode for dynamic emission/economy during peak shaving and valley filling, respectively, considering such constraints as power flow, power balance, ramp speed that are solved by the multi-objective optimization algorithm.
Load shifting consists of moving the load from peak to off-peak times. The net effect is a reduction of peak demand while maintaining the same total energy consumption. Usually this is implemented through usage time rates and/or by using storage devices to stagger the operating time of conventional electrical appliances. In Xing et al., 62 load shifting was demonstrated for PEV with bidirectional capacity in a SG environment to flatten the total demand curve. Whereas, Hu et al. 63 developed a mathematical programming formulation for HEMS to control the SG demand with the optimal load shifting concept. In this survey, they've considered devices like battery storage, PEV and automated windowing, along with an evaluation of DR model in terms of consumer cost reduction. In general, an efficient demand management may be obtained by using device control, metering, load limiters, DLC, ondemand tendering, frequency regulations and time based scheduling. For an energy engineer, the challenge is to find an exact match between demand and supply. Otherwise, it might cause power quality or system reliability problems, like frequency and voltage variations, blackouts and power outages. In fact, DR is a very effective program in terms of reliability when integrating RES with the EMS program. It may be demand-reduction offers (bidding/ buy-back programs), price-based (an effective pricing policy), and incentive-based for users to connect/disconnect their load based on the signal. Shafie-Khah et al. 64 made comparisons between the price and incentive-based DR program and various sub-programs as the Critical Peak Pricing (CPP), ToU, Emergency Demand Response Program (EDRP) and Real Time Pricing (RTP). Another method of load control is also suggested, such as DLC, interrupt/shorten services. Setlhaolo and Xia, 53 on the other hand, discussed the Residential Demand Response (RDR) which was introduced to the household level for peak load management using differentiated prices and a demand control incentive payment. In Figure 6, we summarized the DR process, the pricing system and its benefits.
The retail principle that is generally linked to commercial operations such as metering, pricing, billing, supply and the electricity, sale has currently been accepted and implemented by numerous electricity authorities. The electricity generator sells electricity to resellers (power companies, competing electricity suppliers and electricity traders) in the wholesale market and, ultimately, the purchasing and selling of electricity to the customers takes place in the retail market.
Retail electrical products fall in two categories: a guaranteed-price product and a spot-price product. The guaranteed-price product is characterized by two different characteristics that allow awarding prices ahead of time or for a specific contract period. While, the other category relates on the end-user's interest in the quantity of the offer. Both price products have four constituent elements, namely, ToU, flat rate, seasonal, and fixed invoice. However, the flat rate is the most attractive to the consumer for its simplicity of understanding. Other pricing are distributed dynamic usage-based pricing systems, quadratic cost function for RTP and static pricing policy. For the power market, there is three common terms: a price floor, a price cap, and a price collar. The end user has the right, but not the obligation, to purchase electricity, besides this price is known as the strike price. It prevents the retailer from setting a high spot price. 65 To that extent, Misra et al. 66 suggested dynamic pricing policy, where home and roaming tariffs are taken into account, and the results indicate 34% increase in PHEV utility over the existing optimal PHEVs load.
Day-ahead electricity market can be treated as a financial market when the real-time electricity market is a physical one. Both are working on the concept of pool trading where various curves are established according to the pool. The ISO accepts bids from the aggregator or marketer and defines the market clearing price (MCP). It is only found by plotting supply bid on the supply curve, and demand bids on the demand curve, the intersection of the two is known as the MCP. Authors in reference 67 have designed a compensation mechanism for the market of complex day-to-day offers, in which the DR is programmed at the same time as the generators energy. While, in reference, 68 they proposed an algorithm that determines the optimal control schedules for these devices or the optimal load reduction offers for an aggregator in the power market, based on the virtual power plant (VPP) concept, which includes many consumers with thermostatically controlled devices. Intraday electricity market concepts validated by market participants due to the increasing penetration of renewable energies such as PV and wind power, which require operators to balance the generation of forecast errors. Following direct deregulation, the marketing of RES is allowed in electricity exchanges. Normally, Transmission System Operator (TSO) has to exchange the electricity produced by RES a day-ahead, this is done within a time horizon of up to 36 h, thus correcting forecast errors. Exchanges on the market are settled the day before delivery, 68 i.e. on Sunday at 4 p.m. day-ahead auction must be held for the delivery of Sunday's energy, based on forecast information. The dayahead market is advantageous, especially when the costs and start-up time for producers are very high. SO can decide on such a long process. 69 Another possibility is intraday scheduling, the forecast for the next hour to schedule the current day or period that has already started. In addition, the intraday period can be 15-30 min before use.
Both the program DR and DSM are introduced to reduce peak electricity demand and thereby increase the capacity of the existing grid to accommodate more energy sources to be connected to the grid; and to provide a more comfortable and cost-effective solution for customers. Traditional methods and tools are not effective in managing the behavior of consumers, end-users investors and other institutional factors for local and individual decision-making. Research needs to focus on innovation for the co-evolution of existing infrastructure and environmental conditions, building on the current state of the art of multi-scale energy modeling.

Solution approaches for EMS
This section presents solution approaches for EMS. We highlight the machine learning method and its different models, as it is an important key for energy forecasting and very useful for the efficient functioning of the EMS in the grid. Then we group the solution approaches for EMS into four categories, namely, mathematical programming, heuristics, meta-heuristics and another solution approach. The applications of these approaches are presented along with a comparative analysis table for the methods of each approach.
Different optimization algorithms and programming methods were developed for energy management schemes, like RES management, battery management, LC management and PEV charge/discharge management. The ultimate goal of an EMS strategy is to minimize or maximize the objective function which may include GHG emissions, cost, energy quality, efficiency, load profile, reliability, etc. Therefore, the Internet of Things (IoT) and Machine Learning (ML) are simultaneously gaining in popularity, and both are very useful for the efficient functioning of the EMS in the network. Nowadays, ML models in EMS are essential for predictive modeling of production, consumption and demand analysis because of their accuracy, efficiency and speed. ML models also help to understand the functionality of energy systems in the context of complex human interactions. The use of ML models for conventional energy systems, as well as for alternative and RES, is promising. However, due to the popularity of this field, numerous position papers have been published, which provide an overview of current applications and future challenges and opportunities. 70 However, existing synthesis papers either examine applications of a single ML model, e.g. ANNs, 71 or cover only one energy sector, e.g. solar radiation forecasting. 72  ANNs are frameworks for different ML algorithms to process complex data inputs. It can be used for several purposes such as prediction, regression and curve fitting. It can be adapted in to many applications in smart cities, including hazard detection, water supply, energy and urban transportation. A fundamental unit of an ANN is a neuron that uses a transfer function for output formulation. Its main advantage is their lower complexity for multivariate problems. 73 SVM is another ML method that can be used for energy forecasting. They are based on statistical learning theory for structural risk minimization. In model recognition, classification and regression analysis, SVMs are more efficient than other methodologies. The important range of their applications in the field of load forecasting is due to the ability to make generalizations. It have been applied in different aspects of a SG such as water supply, Energy, evaluation and management of smart, and health domains. 74 Besides, ANFIS is another modeling method of ML that uses an ANN based on the Takagi-Sugeno fuzzy inference system. This technique benefits from the capabilities of fuzzy and neural networks. The method is considered an early form of the hybrid ML method. It has been applied to address issues in areas such as energy, urban governance, and smart city assessment and management. 75 In addition to ANN, SVM, and ANFIS, Decision Tree (DT) method is used to approximate discrete-value target functions that the learned function is illustrated by a decision tree. They are among the most powerful inductive inference algorithms and are successfully used in many different energy systems. 76 Researchers have applied DTs to address the issues related to businesses, air pollution, urban transport, and food to develop a smart city. 77 Another ML method which has been applied to solve problems of energy forecasting is Ensemble methods. Ensemble methods use multiple learning algorithms in ML and statistics to achieve the best modeling performance compared to any single learning algorithm. In statistical mechanics, the method contains only a concrete finite set of alternative models, but allows a flexible architecture from among the alternative models. 78,79 Then, we found the MLP method. Which is an advanced version of ANN for engineering applications and energy systems. It is considered a feed-forward neural network and uses a supervised learning and backpropagation method for training purposes. The method is a simple and popular one for process modeling and prediction, and in many cases it is considered the control model. 80 WNN is as well a method of ML. WNN takes advantage of the benefits of wavelet theory and neural networks and combines them. This method contains a feed forward neural network with a hidden layer. One of its missions is to estimate the function of a process or trend or to compute. A neural network can form the structure of a function using a series of data and generate or compute an expected output value for a specific input value. WNN has several advantages over other neural networks. It requires less training than the MLP method and has a fast convergence. 81,82 Finally there is the deep learning method that aims at modeling the hierarchical characterization behind data prediction models by stacking multi-layered information processing modules. The increase in computing power and data size has led to the popularity of DL. These methods have many applications in the development of SGs. This methods, has contributed to different research aspects of a smart city such as the energy sector, health, transportation, and even smart city management. 83 Table 3 present a comparative study of these models.
Several solution approaches have been used in EMS to ensure efficient and optimal operation of the emerging network. These approaches are shown in Figure 7, where the process of energy management strategy is illustrated with all possible objectives, inputs, technical and economic goals with the optimization framework and the desired outcome. Figure 8 presents a summary of these optimization approaches. Many of the methods are based on classical approaches, such as linear and non-linear mixed integer programming. Linear programming can be qualified as a good approach depending on the objective and constraints, while artificial intelligence methods focus on approaching situations where other methods lead to unsatisfactory results, such as forecasting renewable energy production and optimal operation of energy storage taking into account the aging of batteries, among others.
In this paper, solution approaches for EMS are grouped into four categories, i.e. mathematical programming based, heuristic, meta-heuristic, and another solution approach. The mathematical programming based optimization methods belong to the exact solution approach methods. 84 As the   name suggests, exact optimization methods guarantee an optimal solution. However, the complexity of the calculations increases in this case. For this reason, they are not preferable for a real-time application, especially if it takes longer to find a solution. Whereas approximate optimization methods do not guarantee an optimal solution but provide a solution within a reasonable time with the optimal or closest result. Heuristic or meta-heuristic optimization techniques belong to the approximate algorithms that provide the result at the best price within a reasonable time and can be applied to online or real-time problems. These approaches to EMS solutions are discussed in the next section.

a) Mathematical programming-based EMS (equationbased)
Depending on the nature of the objective function and constraints, methods based on mathematical programming are subdivided into convex programming, Quadratic Programming (QP), Geometric Programming (GP), Mixed-Integer Linear Programming (MILP), Mixed-Integer Nonlinear Programming (MINLP) and linear programming. The EMS problems solved by these optimization techniques share common properties, such as the possibility of being expressed in mathematical terms, the possibility of having continuous or discrete variables, the proven difficulty (NP-complete or worse) and the possibility of including dynamic aspects. Mathematical optimization requires careful consideration when modeling, and the model must be operated with a view to reliability and efficiency. Composite problems suffer from the complexity of the calculations and the curse of dimensionality. 85 Ahmad et al. 74 presented a technical and economic method to optimize a micro-grid based on MILP. This paper shows the advantages of programming the generation of distributed sources, managing the intermittency and volatility of distributed generation, and reducing peak loads. The cost function is solved by linear programming based on a General Algebraic Modeling System (GAMS). Simulations to optimize the size of the micro-grids are carried out using the software named HOMER. While in the other hand, Wang and Liang 86 have effectively applied the Dynamic Programming concept (PD) that can divide the whole problem into different steps and solves it in a discretized form based on time, decision variables and state, to minimize the daily energy cost for the PHEV energy management problem and to reduce the computation time. Likewise, Rotering and Ilic, 87 applied the DP to find a cost-effective solution to PHEV load control in the deregulated power market.
The methods based on Quadratic Programming and convex optimization are widely adopted by researchers who are familiar with systems conditions. It optimizes a quadratic objective function of variables subject to linear constraints on these variables. The QP takes less time to compute than the DP concept, which requires to mesh the problem in state and time, increasing memory and computational demand exponentially as more variables are meshed, a process known as the curse of dimensionality. In Xing et al., 88 an EMS based on multiple time-scales was presented. They considered two aspects of the optimization problem: static scheduling and real-time dynamic compensation. That is solved by a mixed integer QP method based on the optimal charge flows, and battery state of charge is predicted using solar and wind data. In the other hand, Rajasekharan and Koivunen, 89 have applied GP method to balance/level a household's consumption with energy storage devices.
The objective in convex programming is a convex function in case of a minimization program or a concave function in case of a maximization program. However, most constraints are convex functions. The convex programming could solve any problem of linear programming as all linear functions are convex. In Cortés and Martínez 90 and Wu et al., 91 a test of convex programming is carried out and proves to be efficient and fast for the control decision for an optimal energy distribution between the household demand, the PEV battery, the household battery and the power grid. The most common method of resolving the convexity problem is CVX, which is integrated into Matlab. As for MILP, it is a scheduling method that requires some integers as objective variables, while the variables can be non-integers. Table 4 shows a comparative analysis of different programming methods used for an optimal solution in an EMS.

b) Heuristic-based solution approaches for EMS
The heuristic approach is the most knowledge based and elementary method of providing approximate solutions to a given problem according to predefined rules. For EMS, heuristic approaches are well designed to decrease the complexity of calculating the assigned task for an efficient solution. To obtain the best solution, heuristic techniques are combined using biological evolution, genetic algorithms, and statistical mechanisms to achieve optimal energy operation and control. Rahim et al. 92 studied the performance of energy management controllers designed for HEMS to minimize electric bills and peak load profile using the heuristic method. The HEMS performance is tested for the Inclining Block Rate (IBR) and the ToU tariff while maintaining the user's comfort level. Klein et al. 93 presented a study on the MACES (Multi-Agent comfort and energy system) model for BEMS with the aim of minimizing energy consumption and improving the comfort level of the end user. Data from a real test bench is used for simulation and modeling, which includes temperature, user preference, behavior and schedules incorporated in multi-agent Markov decision problems (MADM). Megahed et al. 94 conducted a study on energy management in zero energy buildings using predictive neural network control. Neural network and predictive control and modeling techniques are combined to improve control and reduce disturbances. A neural network is primarily applied for problems. It can obtain more than one optimal solution to choose from, which is an advantage over the MILP formulation.
High number of iterations.

Centralized/forecasted
Linear programming Charging cost reducing Appropriate for real-time application Operation with linear variables only, not applicable to more than two variables Centralized or decentralized/ forecasted energy prediction from intermittent energy resources such as wind and PV. Table 5 shows a comparative analysis of different heuristic-based solution approach in an EMS.

c) Meta-heuristic-based solution approaches for EMS
Centralized management is mostly implemented in meta-heuristic methods, and decentralized management is frequently implemented in methods based on multi-agents. Most meta-heuristic methods, such as genetic algorithms (GAs), ant colony optimization, PSO, bee colony optimization, simulated annealing (SA), and many other methods, are stochastic and are motivated by nature, physical, or biological principle and try to resemble them making a balance between exploration (diversification) and exploitation (intensification). Most meta-heuristic methods are population-based and are a non-random algorithm. For EMS, some methods were used by the researchers, namely GA, PSO, SA, fuzzy, Tabu Search (TS), firefly and ABC. In particular, SA and PSO have become popular as search and optimization tools because of their versatility and their ability to search and optimize in complex multimodal search spaces, non-differentiable cost functions, changing environments, and so forth. These meta-heuristic techniques are computationally robust, but do not require the lens to be convex.
Meta-heuristic approaches are well known for their ability to deal computationally efficiently with complex search and optimization problems, especially those involving characteristics such as combinatorial, non-linearity, nondifferentiability, different types of variables, and so forth. 95 Wasilewski 96 presented a meta-heuristic optimization method for optimizing a microgrid. The methods include evolutionary and swarm particle algorithms. These methods take into account the fact that the deterministic conditions assumed in the problem impose an important limitation on the methodology employed. However, it also recognizes the uncertainty associated with the use of renewable energy. Radosavljević et al. 97 suggested MG power and operation management using PSO for minimizing their total cost by optimally setting the energy management and operation control variables. In the other hand, Sousa et al. 98 proposed an SA approach for energy control in a VPP. This approach is based on a case study of a 33-bus distribution network with 1000 grid-connected vehicles, 66 generators, 32 loads, and the SA results are compared with the MINLP approach. It has proven that SA approach has been more efficient for the management of energy resources in the VPP, providing the best solution in a short time, which is an important aspect in a SG environment, especially when many distributed resources are involved. Table 6 shows a comparative analysis of different metaheuristic based solution approach in an EMS.

d) Other solution approaches for EMS
Apart from heuristics, meta-heuristics, and mathematical programming, few other solution methods have been used in EMS to achieve computational advantages, to improve problem modeling, and precision in results. Such methods as stochastic, MPC, sliding mode control, and fuzzy programming have been developed by various authors. Among these approaches mentioned above, stochastic and robust methods are the most appropriate for dealing with uncertainties; at the first approach, uncertainties are characterized with parameter distributions, while at the second one, we assume that they belong to certain sets, without making any assumptions about the distribution. Zhang et al. 99 proposed a method of Model Predictive Control (MPC) for micro-grid management to assimilate both renewable and distributed production. Its goal is reducing production and energy demand costs and constraints. Chen Generates greater forecast accuracy and provides better results for other applications as it is able to map the complex relationship between inputs and outputs through its training process.

Relevant for forecasting and decision-making
Parallel processing power required, unexplained behavior Decentralized / Forecasted et al. 100 advocated price-based real-time DR management for household appliances using a stochastic and robust optimization approach. Stochastic optimization is designed to minimize the expected full-day electricity payment, while retaining the financial risks related to real-time power price uncertainty. Robust optimization is used to take into account price uncertainty intervals for minimizing electricity payment in the worst-case scenario. The solution selection approach consists of applying specific criteria before applying it to the problem or even before formulating the problems. 100 Some of the problems mentioned above require a lot of computing time and memory space. Mathematical programming requires more time than heuristic and meta-heuristic programming. Most metaheuristic problems are population-based, and a nearoptimal or optimal solution can be found from the search space with less computational load. On the other hand, heuristic approaches are knowledge-based, which makes it possible to find a rough solution to the problem. In the case of heuristic approaches, it is necessary to have prior knowledge of energy management with certain assumptions and flexibility to obtain a solution closer to the optimum with less computational time. Stochastic, robust, MPC, SMC, and so forth, approaches are difficult to implement, but their computer traceability and the accuracy of the results are guaranteed. Table 7 shows a comparative analysis of other solution approaches for EMS.

Classification
In recent years, EMS research has received increasing attention. Many position papers have addressed various types of EMS strategies like HEMS, Building Energy Management System (BEMS), Smart Home Energy Management System (SHEMS), and so forth, along with the quantification of uncertainties and various programs implemented in an EMS such as DR, DSM, and PQM. Several research studies have suggested various methodologies related to EMS. The majority of the methods are based on classical approaches such as non-linear and linear mixed integer programming. The linear programming can be qualified as a good method in function of the objective and constraints, while the artificial smart methods focus on approaching situations where other methods lead to unsatisfactory results, such as forecasting renewable energy production and the optimal functioning of energy storage considering the aging of batteries, among others. In general, more rigorous optimization techniques are applied to maximize energy production from each particular source, minimize electricity costs or maximize storage systems. 101 Different techniques were used by the researchers. Energy management and control optimization in a MG may involve one or more objective functions. These may vary depending on the optimization problem posed. The result may be a single-objective or multi-objective problem, which may include minimizing costs (fuel cost, operating and maintenance cost, and the cost of degrading storage elements such as batteries or capacitors), reducing emissions, and minimizing unmet load. Different researchers propose meta-heuristic techniques to solve the problem of optimization due to multiple constraints, multiple dimensions and highly non-linear combinatorial problems. In addition, other authors have proposed stochastic dynamic programming methods to optimize the problem of energy Table 6. Comparative analysis of different metaheuristic-based solution approach in an EMS.

Meta-heuristic methods
Objective Advantage Drawbacks

Architecture/ uncertainties
Genetic algorithm 96 The operation, the cost of emissions have minimized and increased commercial profit Scalable population-based algorithms including operations such as crossing, mutation and selection at find the optimal solution. Convergence at the right speed. Widely used in many fields.
It is necessary to define crossing and mutation parameters, as well as population parameters and stopping criteria. Risk of trapping in local zones Centralized/scenario based management with multidimensional objectives. Table 8 summarize some existing analysis on EMS, which highlight those points. Each reference adopts a different scenario and a different theory of analyzing. The case study in reference 102 develops an EMS with integration of smart meters for electricity consumers in an EMS context. Two types of smart meters are developed: those belonging to consumers and those belonging to distributors. The smart meters are connected to a SCADA system that supervises a network of programmable logic controllers (PLCs). The SCADA system/PLC network combines many types of information from different technologies used in modern buildings. The control strategy developed implements a hierarchical cascade controller where the internal loops are realized by local PLCs, and the external loop is managed by a centralized SCADA system, which interacts with the entire local PLC network. As for reference, 103 the authors suggested a DSM for a grid-connected household with locally produced photovoltaic energy. For efficient household energy management, intelligent programming of electrical appliances was also introduced.
A generalized formulation for the intelligent energy management of a MG is proposed in reference 104 using artificial intelligence techniques in conjunction with multi-objective optimization based on linear programming. The proposed machine learning is characterized by an improved learning model and a generalization capability. The efficiency of the MG operation is highly depending on the battery programming process, which cannot be achieved by a conventional optimization formulation. They have also used a fuzzy logic expert system for battery programming. The proposed approach can handle the uncertainties related to the fuzzy environment of the whole MG operation and the uncertainty related to the predicted parameters. The results show a considerable minimization of the operating cost and the emission level compared to the MG energy management approaches published in the literature, based on opportunity charging and battery management by heuristic flowchart (HF). Another methodology has been proposed in reference 105 for the optimal allocation of different types of renewable distributed generation (DG) units in the distribution system to minimize annual energy losses. This methodology is based on the generation of a probabilistic generation load model which associates all possible operating conditions of renewable DG units with their probabilities, thereby integrating this model into a deterministic planning problem. The planning problem is defined as a mixed integer non-linear programming (MINLP), with an objective function to reduce the annual energy losses of the system. Constraints include voltage limits, power line capacity, maximum penetration limit, and the discrete size of available power generation units. This method has been applied to a typical rural distribution system with different scenarios, including all possible combinations of RES generation units. The results show a significant reduction in annual energy losses for all proposed scenarios.
Authors in reference 106 presented a new strategy for mixed-mode power management (MM-EMS) and its method for sizing batteries to operate the MG at the lowest possible operating cost. The MM-EMS is developed by combining three proposed operating strategies, namely "continuous operation mode", "power sharing mode" and "on/off mode" for a 24-h period. The objective functions of  107 for the problem of energy management of MG by introducing a nonlinear, continuous-time, sliding-horizon formulation. The method is without linearization and gives an optimal global solution with closed-loop controls. The energy management problem is formulated as a deterministic optimal control problem (OCP). Which is solve with two classical approaches: the direct method and the dynamic Bellman programming principle (DPP). In both cases, they use the Bocop optimal control toolbox for numerical simulations. For the DPP approach, they apply a semi-Lagrangian scheme adapted for managing the optimization of the switching times for the diesel generator on/off modes. The DPP approach finds the global optimum in less than one second, a CPU time similar to the time required with a mixed integer linear programming approach used in previous work. The result shows that the DPP method is very well adapted to this type of problem.
An advanced real-time energy management system (RT-EMS) for MG systems is presented in reference. 108 This Table 8. Present a critical analysis on EMS.

Ref. Main objective
Approach Work explanation 102 Consumer energy management SCADA and programmable logic controller (PLC) implementation -A consumer EMS with smart meter has been achieved by providing control scheme using SCADA and PLC controllers. 103 Household energy management Bottom up approach -The cost-optimal solution is achieved by applying a bottom-up approach to hourly load profiles. 104 Intelligent energy management Fuzzy logic and optimization based on linear programming -The operating cost of the MG has been lowered by improving the battery scheduling process. 105 Energy-loss minimization Mixed integer non-linear programming MINLP -Several types of distribution generation units have been optimally analyzed to minimize energy losses. 106 Energy management mixed-integer linear programming MINLP and linear -Power sharing, continuous run and on/off based mixed mode EMS of microgrid is proposed. A higher DOD of the battery is adopted, resulting in its rapid degradation. 107 Operating cost reduction Dynamic programming -The objective function considers the operational cost of the CGs and the penalty cost on load shedding. The Pontryagin maximum principle is used to reduce the calculation time. 108 Energy costs minimization Genetic Algorithm -The multi-objective EMS model takes into account the cost of operation, the cost of emissions as well as energy trade profit as objectives for an optimal functioning of the microgrid. 109

Energy costs minimization
Artificial bee colony -Reducing the operational cost of home MG through a two-layer control model with experimental validation. 110 Peak-load maintaining Fuzzy logic programming -They minimized the power fluctuations and peaks while exchanging energy with the main grid. No account is taken of the voltage and frequency regulation of the MG. 111 Scheduling control Robust optimization It is proposed to set up an energy management system in two phases, namely a day-ahead unit commitment operation in one phase first and an economic allocation and real-time energy exchange operation in a second phase. 112 Frequency management Stochastic optimization Frequency management is based on the EMS system defined to control the frequency deviations of an isolated MG while meeting technical, economic and environmental constraints. 113 Active losses and cost reduction Hierarchical control Economical operation and reliability of the MG are achieved, respectively, by reducing operating costs and regulating the voltage and frequency of the system. 114 Energy efficiency control

Homeostatic control
The targets for energy efficiency and savings are achieved through the implementation of DR in the residential sector effective. 115 Operational cost managing Model predictive control Reduction of the operating costs of the MG, which includes the life cycle cost of the battery, the cost of trading energy with the main grid and the cost of load generation imbalance, taking into account generator failures and uncertainties.
strategy capitalizes on the power of genetic algorithms to reduce carbon dioxide emissions and energy costs while maximizing the power of available RES. The proposed RT-EMS, its control and communication systems are experimentally tested to validate the results obtained from the optimization algorithm. The proposed RT-EMS and its control and communication systems are experimentally tested to validate the results obtained from the optimization algorithm in a real MG test bed. Simulation and experimental results using real-world data highlight the effectiveness of the proposed RT-EMS for MG applications. An experimental design and a validation of a real-time multi-period artificial bee colony topology-type central EMS for MG in islanding mode are proposed in reference, 109 to maximize the operational efficiency and minimize the operational cost of home MG. The proposed system operates on the basis of data parameterization such as: power available from RES, amount of non-sensitive load demand, and wholesale offerings of generation units and time scheduling for a range of integrated generation and demand units. In comparison with the MINLP algorithm, this proposed algorithm is shown to have the best performance. Its results show the increase in convergence speed and the remarkable improvement in efficiency and accuracy under different conditions.
An EMS strategy design based on a fuzzy logic control (FLC) with low complexity is presented in reference 110 for smoothing the power profile of a grid-connected residential MG including RES and ESS batteries. This strategy is based on production and demand forecasting to predict the future behavior of the MG. According to the MG power error forecast and the battery state of charge (SOC), the proposed strategy guarantees an adequate control of the grid power. While in another hand the authors in reference 111 treat the energy management of a grid-connected MG that includes several conventional generators (CG), renewable generators and ESS. A robust two-step optimization approach is proposed for scheduling power production according to uncertainties, aiming at optimizing the long-term average operating cost under realistic operational and service constraints. The first stage of optimization determines the unit time commitment of the CGs via day-to-day scheduling, while the second stage performs the economic dispatch of the CGs, ESS and energy trading via real-time scheduling. The combined solution addresses the need to manage the large uncertainties regarding load demands and RES production, and provides an efficient solution with limited computing resources that approximately optimizes the long-term average operating cost while meeting service quality requirements. The performance of the proposed approach is evaluated by simulations based on real load demand and RES production data demonstrates the successful operation of the proposed approach by achieving a smooth grid power profile and a battery SOC close to 75% of the nominal battery capacity.
In reference, 111 the authors discuss a new limitedsecurity power management system for a MG that takes into account the steady-state frequency. It considers the MG frequency as a key control variable that is permanently exposed to being excised from its nominal value due to unpredictable intermittencies from RES and/or load consumptions. This study formulates a new objective function based on the frequency-dependent behavior of distributed generation with droop control using integer mixed linear programming. It aims at optimizing the frequency of the MG according to economic and environmental policies. Besides, in order to seek the active participation of consumers in the proposed frequency management approach, a linearized ancillary services DR program is also proposed. In addition, to properly model the impacts of the various uncertainties of the MG in the frequency management approach, a two-step stochastic optimization algorithm is used. Simulations are performed in a typical microarray that operates in island mode for a 24-h programming horizon. The numerical results show the efficiency of the proposed frequency-dependent power management system while simultaneously managing the security and economics of the MG. In addition, the use of demand response programs is shown to save the frequency management approach of microarrays.
An EMS for a stand-alone MG consisting of diesel generators, a wind turbine generator, a biomass generator and an ESS is proposed in reference. 113 The different operating objectives are achieved by a hierarchical control structure under different time-scales. At first the optimal schedules of the diesel generator, wind turbine generator, biomass generator and ESS are determined 15 min ahead of time based on very short-term forecasts of the load and wind speed in the optimal schedule layer. A comprehensive analysis that considers the uncertainty of the load and wind speed is performed in this layer to reduce the cost of operating the system and to ensure a desirable range of the ESS load state. Then, the operating points of each unit are dynamically regulated to ensure the real-time power balance and safe range of diesel generation in the real-time control layer, on the basis of which the ability to react to significant deviations from forecasts and other emergency problems, such as sudden load build-up, can be improved. Finally, the effectiveness of the proposed energy management strategy is verified on a real-time simulation platform based on RT_Lab, and the economic performance with different types of SES is also analyzed.
The authors in reference 114 present strategies for integrating micro-generation hybrid electric systems to the grid through homeostatic control (HC), as a means of reconciling energy supply and energy DR management. The theoretical model underlying HC strategies is presented and a numerical example is provided, using actual power consumption data from a small rural community in Chile. By looking at a particular set of criteria designed to control the supply of RES from a grid-connected MG for residential consumers, the simulation results show that the model is effective when testing these criteria for different energy supply scenarios.
The authors in reference 115 present an extension of a model predictive control approach for MG energy management that considers electricity costs, energy consumption, production profiles, power and energy constraints, and uncertainty caused by environmental variations. The approach is based on a coherent framework of control tools, such as mixed-mode programming and soft-constraint MPC, to describe the dynamics of the MG components and the overall control architecture of the system. The results of the simulation on a particular MG architecture confirm the proposed approach.

Conclusion and perspectives
The global transition to the smart grid is justified by the need to meet the ever-increasing consumption of electricity and to ensure the sustainable and secure supply of electricity to the power system. The future of energy management implementation is prominent. However, the transition from a conventional grid to a smarter grid requires a long-term financial investment. Energy management plays a critical role in improving the efficiency and reliability of supply and distribution systems. This is achieved by applying intelligent algorithms and advanced control systems to optimize and schedule load demand efficiently. Energy management reduces the cost of electricity by approximately 20-30%, which is remarkable and beneficial in the long term. This paper presents a comprehensive and critical review of the concept, objectives, benefits, types and issues of EMS with a complete analysis of the various actors and contributors in the EMS. It addresses the different uncertainties related to the many loads and sources in SG with effective methods to deal with them, power quality management, DSM, active DR, and optimization solution approaches used in energy management to meet the objectives desired within all constraints. Several issues and challenges related to EMS implementation are currently being discussed with various stakeholders that might lead to further research and development for an advanced EMS. The areas for future research to be considered are the following: (a) Improving the cost-effectiveness of SGs through secure and reliable communications is the main challenge, in which a multi-agent system can be developed that is hybridized with optimization algorithms, based on metaheuristics, to achieve energy management that satisfies various objectives and constraints. Numerous applications are possible, for example: management of gas power plants with emissions, trading between micro-grids, etc. it is also possible to take into account (electric vehicles, users, demand management, line losses, etc.) as well as the realtime simulation of interconnected networks. (b) Accurate and rapid modeling of uncertainty is an area that needs to be further developed, which can be considered as an alternative optimization framework for utility system planning that addresses uncertain scenarios and provides a higher level of operational detail. The framework must be capable of modeling impacts associated with a set of flexible and SG technologies which may effectively shift needs for conventional solutions. As an illustrative example, an adequate simulation of operational constraints and uncertainty is necessary in the planning process when evaluating flexible operational solutions that optimize investment in a SG context. (c) A cost-effective, real-time hardware implementation of the EMS should be designed and developed. An IoT-based system architecture implementing specific communication technologies for connected devices can be proposed, which can be applied to the different types of simulators in the field of SG: communication network simulators, power system simulators, combined power and communication simulators. And (d) An integrated system reconfiguration and operation management approach 116 to distributed energy grid systems would be a powerful approach to improve high performance and cost effective with resilient and sustainability properties.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.