A Review of Energy Management and Power Management Systems for Microgrid and Nanogrid Applications

In the past few years, the application and research community has expressed a lot of interest in managing energy and power while using distributed generation systems. Electricity generation and its usage coordination are vital aspects of energy efficiency that can help in saving energy, decreasing energy costs, and fulfilling global emission objectives. Owing to the relevance of the topic, here, the researchers have presented a comparative and critical review of recent developments in the fields of energy management systems (EMSs) and power management systems (PMSs). Furthermore, the researchers also reviewed the various EMS and PMS methods that could be used for reviewing microgrid (MG) and nanogrid (NG) systems. The EMS for MG and NG systems helps in addressing important economic objectives like minimisation of operational costs after optimising the fuel costs, emission costs, and battery degradation costs, while also improving the life of the MG devices. Alternatively, the PMS helps in addressing technical objectives like improving the stability, flexibility, reliability, and quality of MG and NG systems. The researchers have also discussed the drawbacks and challenges affecting the widespread application of EMSs and PMSs.


Introduction
The microgrid (MG) and nanogrid (NG) systems make use of various renewable energy sources (RESs) such as solar photovoltaic systems (PVs), wind systems, and smallhydro systems. Due to the erratic nature of the solar PV and wind RES, many energy storage devices (ESDs) such as ultracapacitors, batteries, and flywheel ESDs can be used for supporting the output power emitted from the RES. The energy storage system (ESS) is configured using either an individual or multiple ESD in a hybrid ESS. The ESS is designed to be used for peak load shaving, load following, intermittent RES output power levelling, and energy arbitrage. Furthermore, many of the smart invertors that are used in the RES and ESS provide ancillary services such as a fault ride-through (FRT) capability and better power quality [1]. For achieving all the above functions, a high-level control is required for managing the energy and power in the RES and the ESS. RESs in microgrids have been actively used in several applications, including residential uses [2], industries [3], university districts [4], and logistics facilities [5]. The energy management system (EMS) and the power management system (PMS) are quite different with regard to their control objectives and compensation duration. In the course of strategy development for energy management, researchers need to consider key parameters such as maintenance costs, fuel costs, capital cost, and system life. The EMSs  The possible markets for NGs are not similar to that of MGs. An NG permits acquisition of a power structure at a relatively lower cost compared to an MG. Consequently, the interest shifts from large/manifold investors to small/limited business proprietors [11]. Figure 2 presents the block diagram of an NG which is integrated with an RES such as wind turbines (WTs) and/or photovoltaics (PVs) in different combinations and an ESS such as ultracapacitors and batteries.

Renewable Energy Source (RES) and Energy Storage Devices (ESDs)
In the recent past, many RESs, especially solar PVs and WTs, have been considered worldwide as both an alternative and competitive energy source for MGs and NGs [12]. Many advantages are displayed by PVs and WTs in providing site-dependent and clean renewable energy with low maintenance costs.
Many alternative RESs have been used for improving the stability, availability, and reliability of energy, with regard to supply and demand. In this section, the researchers have described solar PVs and wind generators as well as batteries and ultracapacitors [13].

Renewable Energy Source (RES) and Energy Storage Devices (ESDs)
In the recent past, many RESs, especially solar PVs and WTs, have been considered worldwide as both an alternative and competitive energy source for MGs and NGs [12]. Many advantages are displayed by PVs and WTs in providing site-dependent and clean renewable energy with low maintenance costs.
Many alternative RESs have been used for improving the stability, availability, and reliability of energy, with regard to supply and demand. In this section, the researchers have described solar PVs and wind generators as well as batteries and ultracapacitors [13].

Photovoltaic (PV)
Photovoltaic (PV) cells are defined as semiconductor devices which directly convert solar energy into direct current (DC) electric energy. These are regarded as significant devices that provide power for different applications such as remote buildings, gridconnected systems (e.g., at the utility or residential scale), and satellites. Hence, the efforts of many researchers have focused on maximising the efficiency and minimising the manufacturing costs of PV cells [14]. The majority of PV cells used in large-scale applications are made using crystalline silicon as it is inexpensive and readily available in the PV markets. However, crystalline silicon is regarded as a primary technology and was first introduced in the 1970s [15]. Figure 3 presents the basic structure of the PV cells. It consists of different electrical components, such as the current source (I ph ) and the diode (D). In addition, other components are needed for a more accurate modelling, such as a shunt resistor R sh , parallel capacitor C p , series resistor R s , and a series inductor L s . are made using crystalline silicon as it is inexpensive and readily available in the PV markets. However, crystalline silicon is regarded as a primary technology and was first introduced in the 1970s [15]. Figure 3 presents the basic structure of the PV cells. It consists of different electrical components, such as the current source (Iph) and the diode (D). In addition, other components are needed for a more accurate modelling, such as a shunt resistor Rsh, parallel capacitor Cp, series resistor Rs, and a series inductor Ls. The PV array can convert light photons into electrons. This technique generates the DC current that is stepped up using the DC-DC converters before it is inverted to supply AC power to the loads. Hence, the power electronic converters play a vital role in gridconnected PV systems. The DC-AC converter output can be filtered using a low-pass filter to eliminate any undesirable harmonics before being connected to a grid [13]. Additionally, a maximum power point tracking system (MPPT) is used to allow optimal energy extraction from the solar rays by altering their incident angle throughout the day.
For increasing the terminal current or voltage of the PV generators, researchers can connect the PV cells in series, parallel, or their combination. If the PV cells are connected in series, it is noted that their voltages are summed. On the other hand, if they are connected in parallel, their currents get summed together. One silicon PV cell displays an output voltage ranging between 0.5 and 0.7 V, while its output power is 4.5 W. Many of the PV installations such as satellites and rooftop panels need a higher voltage than the voltage that is produced using one PV cell. Hence, multiple PV cells are connected in series. A general commercial solar PV module consists of 72-96 cells that are connected in series. Considering that each cell generates 0.5 V and 9 A, every PV module is able to generate ≈ 324 W. Thereafter, several modules can be connected in series to generate 1000Vdc (22 modules) or 1500Vdc (33 modules). The life span of the PV panels can be more than 25 years, during which they can display a natural degradation in their output power, which ranges from 0.5-1 percent every year [16].

Wind
Wind energy can be converted to electric energy using wind turbines (WTs). In this process, wind moves the blades of the turbines, where mechanical energy is converted to electrical energy through the WTs and an electrical generator. However, the availability of wind energy is affected by different local and natural conditions such as power demand profiles and other factors related to WTs such as air density, wind speed, and blade radius, The PV array can convert light photons into electrons. This technique generates the DC current that is stepped up using the DC-DC converters before it is inverted to supply AC power to the loads. Hence, the power electronic converters play a vital role in grid-connected PV systems. The DC-AC converter output can be filtered using a lowpass filter to eliminate any undesirable harmonics before being connected to a grid [13]. Additionally, a maximum power point tracking system (MPPT) is used to allow optimal energy extraction from the solar rays by altering their incident angle throughout the day.
For increasing the terminal current or voltage of the PV generators, researchers can connect the PV cells in series, parallel, or their combination. If the PV cells are connected in series, it is noted that their voltages are summed. On the other hand, if they are connected in parallel, their currents get summed together. One silicon PV cell displays an output voltage ranging between 0.5 and 0.7 V, while its output power is 4.5 W. Many of the PV installations such as satellites and rooftop panels need a higher voltage than the voltage that is produced using one PV cell. Hence, multiple PV cells are connected in series. A general commercial solar PV module consists of 72-96 cells that are connected in series. Considering that each cell generates 0.5 V and 9 A, every PV module is able to generate ≈ 324 W. Thereafter, several modules can be connected in series to generate 1000V dc (22 modules) or 1500V dc (33 modules). The life span of the PV panels can be more than 25 years, during which they can display a natural degradation in their output power, which ranges from 0.5-1 percent every year [16].

Wind
Wind energy can be converted to electric energy using wind turbines (WTs). In this process, wind moves the blades of the turbines, where mechanical energy is converted to electrical energy through the WTs and an electrical generator. However, the availability of wind energy is affected by different local and natural conditions such as power demand profiles and other factors related to WTs such as air density, wind speed, and blade radius, or a degradation in their performance because of ageing. On the other hand, wind energy systems in the MG act as a backup system that can provide an uninterruptible power supply (using an ESS). It also provides low-voltage support or transfers surplus energy to the grids for improved economic benefits [17].
For improving the performance of the wind energy systems, the researchers needed to extensively process the data, analyse the electrical networks, and characterise the effect of the power quality on the general plant performance. Thus, the data needed for assessing the real-time performance of the WT are limited to three real-time variables, i.e., turbine output power (W), rotational speed of the turbines (rad/s), and wind speed (m/s). For each machine installed in the field, additional data analysis and information are required, namely, the distribution of each of the following parameters: wind speed, load current, generator voltage, and wind turbine speed [18].
Recent studies conducted in this field have highlighted the need to develop WTs and other auxiliary equipment. Extensive and persistent research carried out in WT-RESs has helped in decreasing the installation costs and size of the WTs. A low wind speed is still regarded as a challenge during the wind speed prediction. The wind energy potential is dependent on accurate wind speed estimation, site selection for farms, the operation scheme, etc. Hence, the researchers in this field are more focused on developing an optimal design of the wind farms that includes the design of the WTs and layout of the farms. However, the major difficulty that was noted in planning the layout and design of the wind farm was the availability of the wind forecast data compared to solar forecast data, since the wind forecast data are not widely available. This factor is responsible for making the solar energy PV system more predictable compared to the wind RES. As a result, the design and siting of wind farms require a lot of investigation and a thorough wind analysis of the proposed site. Figure 4 presents the basic design of a wind energy conversion system (WECS). In the wind RES, the wind force helps in converting the wind power to a mechanical torque that is rotated to generate an electric current. WECSs are further classified into a variable or a fixed speed system. Double fed induction generators (DFIGs) and permanent magnet synchronous generators (PMSGs) are some of the advanced technologies used in the development of variable speed WTs. The WT is connected to a generator via the gearbox, while the capacitor bank is connected to a DC link of the power electronics interface. Thereafter, the output voltage of the DC-AC power electronics interface can be filtered. A transformer is used to match the voltage to a microgrid load [19]. machine installed in the field, additional data analysis and information are required, namely, the distribution of each of the following parameters: wind speed, load current, generator voltage, and wind turbine speed [18].
Recent studies conducted in this field have highlighted the need to develop WTs and other auxiliary equipment. Extensive and persistent research carried out in WT-RESs has helped in decreasing the installation costs and size of the WTs. A low wind speed is still regarded as a challenge during the wind speed prediction. The wind energy potential is dependent on accurate wind speed estimation, site selection for farms, the operation scheme, etc. Hence, the researchers in this field are more focused on developing an optimal design of the wind farms that includes the design of the WTs and layout of the farms. However, the major difficulty that was noted in planning the layout and design of the wind farm was the availability of the wind forecast data compared to solar forecast data, since the wind forecast data are not widely available. This factor is responsible for making the solar energy PV system more predictable compared to the wind RES. As a result, the design and siting of wind farms require a lot of investigation and a thorough wind analysis of the proposed site. Figure 4 presents the basic design of a wind energy conversion system (WECS). In the wind RES, the wind force helps in converting the wind power to a mechanical torque that is rotated to generate an electric current. WECSs are further classified into a variable or a fixed speed system. Double fed induction generators (DFIGs) and permanent magnet synchronous generators (PMSGs) are some of the advanced technologies used in the development of variable speed WTs. The WT is connected to a generator via the gearbox, while the capacitor bank is connected to a DC link of the power electronics interface. Thereafter, the output voltage of the DC-AC power electronics interface can be filtered. A transformer is used to match the voltage to a microgrid load [19].

Battery Energy Storage System
Batteries are devices used for storing electrical energy through the process of charging chemical cells, so that they can be reused (i.e., discharged), whenever needed. There are different types of batteries such as Ni-metal hydride (NiMH), lead-acid, reductionoxidation (redox), lithium-ion (Li-ion), and sodium sulphur (NaS). In this section, the researchers have described the Li-ion and lead-acid types of batteries, since they are most commonly used for energy storage and preservation for various wind and solar PV applications [20,21]. Figure 5 presents the equivalent circuit of a battery that consists of three components, i.e., (1) internal resistance, R self , that helps in determining the self-discharge energy loss that takes place during the energy storage operations; (2) battery current, I bat , that depends on the charging and discharging activities; and (3) capacitance, C, that accounts for the complete charge that is stored in a battery as a scaled voltage drop, V SOC , with a per unit value between 0 and 1.
cations [20,21]. Figure 5 presents the equivalent circuit of a battery that consists of three components, i.e., (1) internal resistance, Rself, that helps in determining the self-discharge energy loss that takes place during the energy storage operations; (2) battery current, Ibat, that depends on the charging and discharging activities; and (3) capacitance, C, that accounts for the complete charge that is stored in a battery as a scaled voltage drop, VSOC, with a per unit value between 0 and 1. •

Lead-Acid
The lead-acid battery is the oldest battery technology. It provides a large amount of power at a low cost. Hence, it can be used for applications that require a large amount of surge power support with a lower depth of discharge (DOD) such as emergency power, a backup power supply (e.g., an uninterruptable power supply (UPS)), and power quality management. On the other hand, this battery technology also has many disadvantages such as a short life cycle and low energy density. Over-discharging and deep cycling can negatively affect the life span of these batteries. Recently, many new developments in this technology have been carried out using advanced materials such as gel cells and absorbed glass mats. This advanced technology is called valve-regulated lead-acid batteries and they have displayed a better performance, longer life span, and lower maintenance [21]. •

Lithium-Ion
Lithium-ion batteries present many features such as high energy density, high performance, and a long life cycle (~1000 cycles). Due to these features, Li-ion batteries are considered to be better than lead-acid batteries for energy storage and can be used in various applications such as mobile products, electric vehicles, customer electronic devices, RES generation support, and frequency regulation at a utility level [22].

Ultracapacitor
The ultracapacitor helps in the process of charging or discharging a device at a higher power within seconds. Compared to batteries, the ultracapacitor shows a longer life span (~10 5 cycles) [23]. It can be completely discharged without significantly affecting its life span. Ultracapacitors show a low energy density compared to other ESDs such as batteries when they have a higher power density. Hence, the ultracapacitors can be used in applications that require a higher rate of power with a shorter deep cycle, such as backup power supplies, DC link voltage support in a converter, EV acceleration and deceleration, and a power quality correction in various utility applications [24,25]. Figure 6 describes the  Lead-Acid The lead-acid battery is the oldest battery technology. It provides a large amount of power at a low cost. Hence, it can be used for applications that require a large amount of surge power support with a lower depth of discharge (DOD) such as emergency power, a backup power supply (e.g., an uninterruptable power supply (UPS)), and power quality management. On the other hand, this battery technology also has many disadvantages such as a short life cycle and low energy density. Over-discharging and deep cycling can negatively affect the life span of these batteries. Recently, many new developments in this technology have been carried out using advanced materials such as gel cells and absorbed glass mats. This advanced technology is called valve-regulated lead-acid batteries and they have displayed a better performance, longer life span, and lower maintenance [21]. •

Lithium-Ion
Lithium-ion batteries present many features such as high energy density, high performance, and a long life cycle (~1000 cycles). Due to these features, Li-ion batteries are considered to be better than lead-acid batteries for energy storage and can be used in various applications such as mobile products, electric vehicles, customer electronic devices, RES generation support, and frequency regulation at a utility level [22].

Ultracapacitor
The ultracapacitor helps in the process of charging or discharging a device at a higher power within seconds. Compared to batteries, the ultracapacitor shows a longer life span (~10 5 cycles) [23]. It can be completely discharged without significantly affecting its life span. Ultracapacitors show a low energy density compared to other ESDs such as batteries when they have a higher power density. Hence, the ultracapacitors can be used in applications that require a higher rate of power with a shorter deep cycle, such as backup power supplies, DC link voltage support in a converter, EV acceleration and deceleration, and a power quality correction in various utility applications [24,25]. Figure 6 describes the equivalent circuit model of the ultracapacitor that includes a self-discharging resistor, R sd , a cell, and a junction resistance, R s . R ss and C ss depict the transient response of the ultracapacitor.  Ultracapacitors are categorised into three types. Type 1 includes the electrical doublelayer capacitor (EDLC) which relies on the electrostatic field between two plates. Type 2 presents the pseudocapacitors which use electrochemical reactions to store the electric charge. Hybrid capacitors are the third type and they combine the EDLC and the pseudo-  Ultracapacitors are categorised into three types. Type 1 includes the electrical doublelayer capacitor (EDLC) which relies on the electrostatic field between two plates. Type 2 presents the pseudocapacitors which use electrochemical reactions to store the electric charge. Hybrid capacitors are the third type and they combine the EDLC and the pseudocapacitors and provide a higher capacitance compared to pseudocapacitors and EDLCs [26].

Microgrid Reconfiguration
To run the MG in an optimum and effective manner, one of the recommended technologies is MG reconfiguration [27]. Reconfiguration can be regarded as a kind of emergency control, including load and generation shedding and changes in topology, as well as other control measures, for redirecting power flow towards the remaining loads. An effectual and optimum reconfiguration entails smart and swift actions. Therefore, identifying a precise numerical or heuristic technique is quite necessary [28].
The primarily aim of reconfiguration is to reduce losses and improve load balancing at the network level by taking into account the maximum possible network and targeting to maintain an optimum voltage profile in the system. Numerous methodologies have been recommended for the optimisation techniques to attain optimum reconfiguration [29].
Recent attempts have accounted for the operating costs [30], including the distributed energy resource (DER) shutdown/start-up costs, as well as the uncertainty costs [31]. Additionally, researchers enhanced the reliability and power quality of the MG [32,33]. The research work mentioned in [34] regards limits placed on the apparent power rather than the individual reactive and real power limits. Furthermore, for system stability management, reconfiguration could be regarded as a useful tool, i.e., keeping the microgrid at a distance from the unstable region [28]. Moreover, researchers minimised the overall power losses and enhanced the distribution network's voltage profile [35,36].

Energy Management System (EMS)
The first EMS in the world was designed during the 1960s. However, during the 1970s, it was renamed as an energy control centre (ECC). Following this, it was again renamed the supervisory control and data acquisition EMS (SCADA-EMS) and was used as a data tracking and collection system, and was commonly used in industrial facilities. The SCADA used advanced computational programs during the early 1990s and was converted to a real-time supervisory controller called the EMS. This system included many activities such as demand side management (DSM), load control (LC), and a distribution management system (DMS) [37].
The current EMS refers to a computerised program that is used for monitoring and controlling the functioning of every element and flow of power to optimise the MG and NG systems and also obtain optimal productivity [38]. The EMS helps in optimally distributing multiple energy sources to their customers without conceding the protection, safety, and efficiency of the system [39]. The EMS monitors, controls, optimises, and regulates the load, transmission, distribution, and generation-related activities [40]. Hence, the basic function of the EMS was the creation of an effective balance between demand and supply. This balance maintenance is cost-effective even under some financial uncertainties and limitations (uncertainties in an EMS architecture can include fluctuations during the generation of RESs, electricity costs, and load activities). It can function with dispatch, power, SCADA, energy scheduling, real-time accounting, and transmission security management. With the growth in the grid after the integration of plug-in electric vehicles (PEVs), ESSs, RESs, buildings with a higher power need, and other variables, the design and the function of the EMS is becoming more complicated. In the past few years, processes based on machine learning (ML) and the Internet of Things (IoT) have garnered a lot of attention and have proved to be helpful in the operation of EMSs [41,42].
The two key components of the EMS are DSM and demand response (DR), which aid in enhancing the MG and NG systems' load profile, decreasing peak demand, and effectively employing system assets. Even though DR and DSM are often employed interchangeably, it should be noted that that are not the same thing. As per the user's perspective, the DSM is aimed at improving flexibility. The application pertaining to DSM programs could range from increasing energy efficiency with improved insulation materials to energy systems that are completely self-contained and can automatically respond to changes in supply/demand [43].
Energy management in the MG and NG systems requires a comprehensive automatic system that helps in obtaining optimal resource scheduling [44]. This system relies on advanced information technology and control objectives for optimising the management of the ESS and distributed energy sources. Many researchers have ensured energy management by optimising various objective functions that are regarded in the energy management process such as maximising the generator output power at a specified time, maximising the ESD life span, minimising the operational costs of the MG and NG systems, and minimising the greenhouse gas emission costs.

Energy Management System Techniques
After considering one or multiple control objectives, different techniques can be used for optimising the EMS in MG and NG systems. These techniques take into consideration reduced costs during maintenance, emission costs, operational and fuel costs, and ESD (battery or super capacitor) degradation costs.
Many studies have proposed EMS processes that use different techniques and offer effective and optimal solutions for the MG and NG operations. These techniques have been segmented by the researchers by considering the planning and optimisation methodologies employed for strategic, tactical, and economic purposes. All these processes and techniques have been outlined below.

Energy Management Based on Mixed Integer Linear and Non-Linear Programming Methods
Mixed integer linear programming (MILP) and the mixed integer non-linear programming (MINLP) processes were regarded as the classical optimisation techniques. Furthermore, the objective functions and constraints used in the linear programming system include linear functions and real values. They include the determination of optimal value decision variables that help in determining the set of quantities.
In an earlier study [45], researchers presented the EMS for hybrid islanded AC/DC MG systems. Their proposed algorithm helped in controlling the system and ensuring the stable operation of the MG, while also providing clean water to customers. This optimisation algorithm was based on the MINLP system, wherein the objective functions decreased the daily operational costs.
A different MINLP and global optimisation technique-based EMS was proposed for an MG system that consisted of solar PVs, diesel generators, wind, fuel cells, microturbines, and battery storage systems. This proposed algorithm helped in minimising the cost of the distributed generation (DG) and the amount of greenhouse emissions. Furthermore, it also considered the no-load costs of the distributed generators, non-linear losses within the DG, non-linear losses in a distribution system, and the start-up/shutdown costs of a DG. The researchers noted that the battery storage system played a vital role in minimising the generation costs and number of emissions, while also compensating for generation shortage [46].
A networked NG consisting of an EV-battery swapping station (BSS) could also be considered as a cyber-physical energy management system (CPEMS) [47]. The researchers proposed an algorithm for optimising the reliability, economics, and resilience of the energy supply system. This optimisation problem was based on MILP. Results indicated that the proposed CPEMS showed many economic benefits, ensured reliability and battery storage, and prevented the under-utilisation of the capital-intensive PVs.
The present study proposes a MILP model to address challenges concerning energy management and planning integrated operations for a smart seaport grid (such as a port MG) comprising PV and battery storage infrastructure. The objective is to minimise the overall operational cost due to delays and optimise energy costs considering hourly tariffs and the choice to sell energy under PV uncertainties. The endeavour concerning operation planning is to ascertain the yard equipment, including the quay crane count, requiring assignment to vessels considering one-hour intervals. Planning also requires optimising ship berthing time, directly affecting cold-ironing energy needs and reefer container availability. The outcomes indicate that the port MG scenario is superior to typical settings for cost optimisation [48].
An EMS-based non-linear optimisation framework is formulated to regulate battery scheduling and facilitate a reduction in operation cost for a PV and battery DC MG system tethered to the grid. The suggested framework incorporates ageing parameters and empirical data associated with real-world cost degradation of Li-ion batteries. The Li-ion battery degradation cost (BDC) expression is formulated considering the impact of the battery DOD and temperature on performance. Additionally, cold and hot climate areas are accounted for to ascertain the PV-specific levelised cost of energy. The framework also models energy losses and nodal voltages to allow the DC MG to operate optimally. The outcomes indicate that the DC MG operational cost was reduced significantly [49].

Energy Management Based on Dynamic Programming (DP) and Rule-Based Methods
A dynamic programming technique was used for solving complex problems that could be sequenced and discretised. This problem could be classified into many sub-problems that were solved optimally. Thereafter, these solutions were superimposed to develop an optimal solution for the primary problem [50].
In [51], the researchers developed an effective centralised rule-based EMS for the islanded and grid-connected MGs. This algorithm was developed such that it kept the battery's state of charge (SOC) below 80% in the islanded MG mode. On the other hand, the battery SOC in the grid-connected MG mode had to be maintained above 60% to ensure reliability in the islanded mode operations. This technique allowed a smooth transition between the two modes and ensured voltage and frequency stability of the systems.
Another EMS based on dynamic programming for controlling the MG system was proposed in [52]. It included wind energy and battery systems. The objective function of this EMS was to increase the selling benefits of wind energy and minimise the costs of fulfilling the load demands in the MG. This EMS also regarded the deregulation of the energy market, where electricity prices were allowed to fluctuate based on the demand and supply. Furthermore, the battery control action was also determined at differing price intervals, while the computation time was decreased in the large-scale BESS systems.
In [53], the researchers proposed a new EMS for the islanded NG. It consisted of solar PVs, fuel cell generation, and battery storage. This EMS algorithm was proposed to achieve better scheduling of the battery charging and discharging processes and minimising the operational costs of generation. Furthermore, the researchers used stochastic dynamic programming (SDP) for optimising the EMS. They also used the Markov model for predicting the solar PV irradiation cycle. Their simulation results indicated that SDP was more effective than the rule-based technique. Furthermore, the SDP-based approach ensured minimal operating costs as it minimised the fuel generator operating time during every cycle. This simultaneously improved the battery availability in the upcoming cycle as the SOC was elevated at the end of every cycle.
In [54], the authors used a novel algorithm for the PV-NG system that was integrated with battery storage and diesel generation. This proposed algorithm was DP based and included the objective function to improve the system's power flow. The results indicated that this proposed algorithm could achieve a maximal PV energy utilisation, low diesel fuel consumption, and less battery life loss, in comparison to the rule-based technique.
A dynamic programming technique was proposed in [55] for the islanded MG that included solar PVs, diesel generation, and a battery storage system. This technique ensured optimal energy management, where the researchers aimed to minimise CO 2 emission costs and operational costs by improving the scheduling system for the distributed energy resources (DERs). However, some drawbacks of this technique were the DER capacitance and low power balance between demand and supply.

Energy Management Based on Metaheuristic Techniques
The metaheuristic method is regarded as an alternative process for MG optimisation, as it combines different processes such as a genetic algorithm (GA), biological evolution, and statistical mechanisms for deriving the optimal solution for controlling energy sources in the MG system.
A multi-objective EMS was proposed so that the MG could achieve effective load dispatch and low battery degradation costs [56]. With the help of the GA and rule-based techniques, the researchers could obtain real-time control of the energy sources and could predict them on the previous day. They used a diesel and battery generator to supply energy and fulfil the load demands in real time. They also suggested load shedding for maintaining the balance between the load demand and the amount of electrical power generated.
In [57], the researchers proposed a new optimal scheduling control technique for an EMS that was based on the binary particle swarm optimisation (BPSO) for MGs with wind energy, solar PV, fuel cells, a diesel generator, and batteries in a virtual power plant (VPP). This proposed algorithm helped in minimising the overall system costs. The results indicated that the technique could efficiently minimise the grid energy consumption to 47%, while the CO 2 emission was reduced by 8.46%. The binary PSO showed its best performance while minimising the CO 2 emissions, saving costs, and decreasing energy consumption.
A different EMS was proposed based on the particle swarm optimisation (PSO) and Gaussian mutation for a standalone hybrid MG system that included a solar PV module, wind energy, battery storage, and diesel generation. The simulation results indicated that this algorithm could minimise fuel costs and system capital costs [58].
Another EMS based on the artificial bee colony (ABC) algorithm was proposed for improving the economic dispatch for the isolated MG that included WTs, solar PV, energy storage, and dispatchable generation [59]. However, owing to the intermittent RES and load demand, the neural network was combined with the Markov chain to predict the output of the power sources. This led to a 30% decrease in energy costs.
In [60], the researchers proposed an expert system based on fuzzy logic that was combined with metaheuristic algorithms, called the grey wolf optimisation, for improving the MG grid. The main objectives of this system included the minimisation of generation unit costs and a reduction in the emissions of fuel sources. The researchers considered battery optimal capacity, which helped in minimising fuel consumption. Furthermore, the results indicated that the proposed system showed a higher efficiency compared to the GA, PSO, grey wolf optimisation, BAT, and the improved BAT methods with regard to fulfilling the objectives and minimising the operational costs of the MG.
A novel EMS was proposed based on the load prediction for 24 h for an MG which includes solar PV modules, WTs, microturbines, and storage units [61]. This EMS used the artificial fish swarm optimisation technique. The control objectives of this technique included the minimisation of costs noted in the power generation system. The results of this technique indicated that it improved the utilisation of renewable and non-renewable energy generation as well as provided better charge and discharge activities of the batteries.

Energy Management Based on Multi-Agent Systems
A multi-agent optimisation technique helps in the decentralised management of the MG. This technique includes human behaviour-related components for fulfilling all specified objectives.
A multi-agent-based algorithm was proposed for grid outage management for two MG systems in an earlier study [62]. The MGs included solar PV modules, wind energy, load, and battery storage. The main objective of the control algorithm was to decrease operational costs from PV intermittency and the stochastic nature of the critical load. The researchers also considered the price variations in the grid and critical load. Simulation results showed that the outage management algorithm effectively maximised the power generation of the MG system and minimised the system operational costs.
A new multi-agent-based EMS was proposed for a standalone MG system that consisted of fuel cells, RESs (wind and PV), and an ESS [63]. The control objectives of the algorithm included the maintenance of the balance between the energy demand and supply. Additionally, the researchers used auto regressive moving average (ARMA) models to forecast the PV irradiation, wind speed, atmospheric temperature, and the load that is connected to the system. The results showed that the proposed EMS could adjust to the variations in temperature, irradiation, wind speed, and load conditions. A decentralised EMS that used the multi-agent technique was proposed for an MG which included batteries, an electrolyser, solar PVs, wind, diesel generation, and fuel cells. The researchers also included fuzzy logic with cognitive maps for optimally managing the MG activities. Thereafter, the researchers compared the centralised and decentralised approaches and noted that the decentralised process presented many operational advantages with regard to system breakdown or failure [64].
Furthermore, a new multi-agent-based EMS was proposed for the MG. It combined the centralised and decentralised approaches and could optimise the economic operations of the MG system. The researchers noted that a centralised EMS can communicate with all DERs in an MG only in the presence of a centralised decision-making entity. The control commands could be transmitted from the centralised controller to local controllers in the DERs. However, the decentralised control can assign communication between the DERs without using any centralised controller [65].

Energy Management Based on Fuzzy Logic (FL) and Neural Network (NN)
In [66], the researchers presented an EMS design based on full-load (FL) control for smooth power production in an interconnected residential MG. This MG system included RESs such as wind and PV, while the battery was the storage energy source along with the load. This proposed algorithm decreased the power fluctuations and peaks when energy was exchanged between the MG and the main grids. This also improved the life cycle of the battery as the SOC level was maintained near 75%. The proposed technique showed a better and more efficient performance compared to other states of charge-based EMS techniques.
An optimal EMS based on fuzzy logic control (FLC) was proposed in [67] for the independent DC MG in the ZigBee-based communication network. This algorithm ensured a better utilisation of the RES and improved the life cycle of battery storage. All experiments validated the effectiveness of the proposed technique.
In [68], the researchers presented an effective EMS that was based on the multiobjective strategy for an MG that included solar PVs, WTs, microturbines, fuel cells, and a battery storage system. This algorithm helped in minimising the CO 2 emission and operational costs of the MG. This included activities such as battery charging and discharging rates that were determined using the FL system. Furthermore, the researchers introduced a neural network to predict the RES load demand and power generation. This proposed technique minimised the operational costs and emission levels of the MG. Additionally, the fuzzy expert system was introduced to decrease the maintenance costs of the battery, allowing battery scheduling as it extended the operational life span of the battery via the lower depth of the battery discharge.
A novel EMS model based on the Lagrange programming neural network (NN) approach was introduced for optimising the performance of MG systems that included solar PVs, WTs, microturbines, a battery bank, fuel cells, and a diesel generator [69]. This model helped in minimising the overall MG costs in addition to the fuel costs, operational and maintenance costs, and the emission costs of the generator units. The researchers employed a radial basis neural network that could predict the load demand and the RES power generation. The loads could be classified into four types, i.e., price-sensitive load, controllable load, thermal load, and critical load. This proposed technique was seen to be more effective than the PSO.
Another EMS based on the NN technique was designed and proposed for a gridconnected MG that included solar PVs, WTs, batteries, and electrical cars. This model aimed to maximise the power supplied by PVs and WTs and minimise the power import from the utility grid. The model helped in improving the life cycle of the batteries when the discharge depth was set at 60%. The researchers considered two kinds of load demand (i.e., critical and ordinary). They also developed an extended Kalman filter with a hybrid wavelet function-based NN technique for predicting the load and power generation in the RES [70].

Energy Management Based on Other Artificial Intelligent Methods
In [71], the researchers developed an EMS leader-follower algorithm that was based on the game theory technique used for a grid-connected MG. This technique helped in maximising the MG profit exclusively with the prosumers while also maintaining the Stackelberg equilibrium to ensure a reasonable share of the distribution profit. The operators of the MG made use of different prosumers while the evolution used a non-linear programming technique to fulfil the Stackelberg equilibrium. This proposed approach helped in increasing the number of PV prosumers, which improved the MG profits and enabled a better convergence rate.
Another EMS was developed based on the rolling horizon Markov strategy for gridconnected MG systems that included WTs, combination of heating and power generation (CHP), and a battery storage system. This algorithm helped in reducing the gas costs and minimised the electricity costs after considering the intermittency of the wind power that was modelled using the Markov decision process (MDP). This proposed approach indicated that it was more effective with regard to performance and computation time compared to the scenario tree-based approach [72].
In [73], the researchers developed an optimal EMS for an NG that included battery, PV, and ultracapacitor devices for a house. This proposed algorithm aimed to improve battery charging and discharging activity. It was also based on the rolling optimisation process. MILP was used for resolving the optimisation problem. The researchers also proposed a technique for alleviating the power fluctuations between the NG and main grid using a smoothing function.
Another adaptive intelligent-based EMS was proposed for the grid-connected MG that was integrated with the RESs (wind and PV) and ESSs (battery and supercapacitor). The main objectives of this model were to obtain a maximal power utilisation of RESs, reducing the load fluctuations, and managing the system power dispatch. Combining the battery with the super capacitor can significantly help in managing the smooth load as the smooth capacitor can handle the sudden load fluctuations and variations. This proposed algorithm displayed an effective ratio between the real-time energy discharge and available energy in comparison to the PSO [74].

Energy Management Based on Stochastic and Robust Programming Methods
A novel multi-objective stochastic technique-based EMS was proposed for the hybrid grid-connected MG that included various RESs such as WTs and solar PVs in [75]. The objective of this proposed algorithm was aimed at minimising the energy losses in the MG and operational costs in the RESs. The optimisation problem could be resolved by using a weighting sum for the feeding loss systems and total operational costs. The researchers noted that this proposed technique solved the MILP problem when they tested the algorithm using the IEEE 37 node distribution system.
Another stochastic problem-based algorithm was developed for the grid-connected MG for minimising the traditional generator operational costs, decreasing the commercial costs matching the grid energy, and increasing the battery life span. This algorithm included two steps, in which step one carried out MG optimisation and step 2 analysed the output power for computing real-time energy loss in the MG [76].
An optimal EMS was proposed for the grid-connected MG that included battery storage, PEVs, and solar PVs. The researchers also considered the load and RES uncertainties. This proposed algorithm could be classified into two sub-problems, wherein the first problem included scheduling within the energy boundaries that were defined to protect the system. The second problem assessed the real-time ability of the energy deviation limit to regulate the frequencies. This algorithm was more cost-effective compared to other techniques [77].
In [78], the researchers proposed a decentralised EMS for the grid-connected MG that consisted of wind power, solar PVs, train stations, and batteries. This algorithm included an agent-based model and robust optimisation technique. The researchers also assessed the performance of the MG with regard to the cost of the power differences associated with RES generation and power load uncertainties.
The study proposed a two-level EMS for an isolated MG network segment comprising physical connectivity to ensure energy and data exchange. The EMS comprised an outer layer that catered to information exchange and power support pertaining to the interconnects; simultaneously, the inner EMS layer provides power scheduling for every on-fault MG in the case of MG interconnection disruption. A stepped demand response program (DRP) is formulated and integrated with the energy management framework to optimise MG operation. Furthermore, the MILP notation was used to express the issue in the form of a stochastic optimisation expression to facilitate swift responses and a globally optimal outcome. The implementation comprised a five-MG-based distribution setup implementing the optimisation function. Simulation outcomes suggested that the suggested technique enhances MG performance and facilitates operational cost reduction [79].

Energy Management Based on Model Predictive Control (MPC) Methods
A robust model predictive control (RMPC)-based EMS algorithm was proposed in [80] for MG systems that included WTs, solar PVs, loads, and battery banks to manage the energy output from RESs and energy loads. The proposed EMS helped in minimising the integrated economic operational costs. It was combined with mixed integer programming. It was noted that the proposed RMPC technique made the MG management operations more reliable and also minimised the system operational costs.
In [81], the researchers developed a novel stochastic MPC-based EMS algorithm for controlling the MG that was composed of diesel and fuel cell generation, RESs, and an ESS. The main objective function of the novel model was to minimise the cost of energy demand and unit generation. The researchers also used the Monte Carlo simulation technique for predicting the PV, wind, load, and electricity costs. The simulation results indicated that their proposed stochastic technique displayed minimal operational costs.
Another EMS was proposed that was based on a two-stage predictive technique for a hybrid interconnected MG system composed of PVs and wind as RESs, along with ESSs (battery and ultracapacitor). The researchers also considered the costs of the battery and the ultracapacitor in addition to the discharge depth. They modelled the long-term costs and converted them to short-term costs related to real-time operations. The results indicated that the upper-stage EMS minimised the operational costs while the lower-stage EMS decreased the fluctuations between the MG and main grid [82].
In [83], the researchers developed and proposed a multi-step predictive optimal control model that was operated over 3 h, with 15 min steps for the islanded MG that included traditional and renewable energy sources, loads, and an ESS. The researchers included a cost function that considered the costs associated with the fuel consumption, battery SOC, RES reduction, and load-shedding quantity. The simulation results of the model indicated that their proposed algorithm displayed an optimal performance when allocated with the forecasting uncertainties.

Energy Management Based on Other Techniques
In [84], the researchers presented a novel optimisation system for the independent MG that included a battery bank and solar PV for determining the optimal economic system. They considered different control strategies for the EMS. Furthermore, they also determined the lifetime and longevity of the batteries by implementing an electrochemistry-based advanced model. The results indicated that this proposed optimisation technique helped in minimising the energy cost levels by 9.7% and also increased the battery service period by 48.6%. Thus, this model was seen to be more efficient compared to the baseline techniques.
In another study, the authors used two different techniques for optimising and designing an MG system which included turbine generation, PVs, and a battery bank for minimising the emission and energy costs for the MG. Technique one included the MILP that could optimise the energy management whereas technique two was the probabilistic Markov model that was used for predicting the PV. The researchers presented a linear model in their design for assessing the life span of the batteries [85].
Another EMS was designed for hybrid MG systems which included the RES (PV and wind), battery bank, and a non-RES such as diesel generation. This MG system operated in two different modes, i.e., on-grid and off-grid. Hence, it contained a control mechanism in the inverter for transmitting between the main grid and the MG. The results indicated that this proposed algorithm offered efficient energy that was transferred to the battery along with the loads and grids. This design allowed the model to work at rates of up to 10% [86].
This study proposes using the DSM scheme for a smart grid, comprising active (prosumers) and conventional consumers. The scheme considers wind energy prediction uncertainty for calculations. The rolling horizon scheme is employed to have prosumers implementing the DSM system to optimise cost considering wind power uncertainties; game theory is used to implement the scheme. Real-world datasets used for mathematical simulations indicate that the proposed stochastic scheme is superior to the typically expected value scheme for better individual cost optimisation [87].
The present work presents a game-theory based approach for a distributed, optimal, and autonomous demand-side EMS for smart grid systems. The objective is to reduce energy costs and regulate overall residential power requirements for several consumers sharing a common source system. Simulation outcomes confirm that the suggested scheme reduces individual electricity cost, overall energy cost, and overall peak-to-average energy demand [88]. Figure 7 presents a summary of different EMS methods that were used for the MG and NG systems based on the abovementioned literature review.
Based on the literature review described above, by changing non-linear functions into linear functions in models, power optimisation can be transferred via the MILP technique into mixed integer programming. For the optimisation model, MILP considers integer variables. Through the integration of integer variables, MILP could be used for the optimisation of the minimum operational cost pertaining to large power generators, including its stop-start cost related to the power system. Moreover, expression of the minimum operation power output pertaining to power generators can be done, which contributes to the lifespan of the generator. FLC possesses a quicker computational time versus MILP, but is associated with a relatively high cost. When the electricity pricing is dynamic, DP could be used to solve the EMS model. An NN's key functionality is its useability for controlling and predicting the EMS. An NN can also learn complex models that are deemed difficult to be determined. An NN is employed for forecasting wind generation and solar generation as well as the load demand for MGs. However, the problem with using an NN algorithm is the requirement for training. MPC can be defined as a rolling process to repetitively solve the EMS optimisation model based on the updated forecasted data. MPC has been verified as a feasible method for numerous control issues with regard to uncertainty. Thus, applying the MILP algorithm in an EMS allows for reaping greater economic benefits. ergy costs and regulate overall residential power requirements for several co sharing a common source system. Simulation outcomes confirm that the s scheme reduces individual electricity cost, overall energy cost, and overall peak age energy demand [88]. Figure 7 presents a summary of different EMS methods that were used fo and NG systems based on the abovementioned literature review. Based on the literature review described above, by changing non-linear into linear functions in models, power optimisation can be transferred via the M nique into mixed integer programming. For the optimisation model, MILP con teger variables. Through the integration of integer variables, MILP could be use optimisation of the minimum operational cost pertaining to large power gener cluding its stop-start cost related to the power system. Moreover, expression of mum operation power output pertaining to power generators can be done, which utes to the lifespan of the generator. FLC possesses a quicker computational tim MILP, but is associated with a relatively high cost. When the electricity pricing is DP could be used to solve the EMS model. An NN's key functionality is its usea controlling and predicting the EMS. An NN can also learn complex models deemed difficult to be determined. An NN is employed for forecasting wind g and solar generation as well as the load demand for MGs. However, the prob using an NN algorithm is the requirement for training. MPC can be defined as process to repetitively solve the EMS optimisation model based on the updated f data. MPC has been verified as a feasible method for numerous control issues wi to uncertainty. Thus, applying the MILP algorithm in an EMS allows for reapin economic benefits.
Globally, large and small research groups have started taking an interest in MG and NG systems. In the IEEE and Elsevier database, this can be observed via word search ("microgrid" OR "nanogrid") and ("energy management system") Globally, large and small research groups have started taking an interest in EMSs for MG and NG systems. In the IEEE and Elsevier database, this can be observed via the keyword search ("microgrid" OR "nanogrid") and ("energy management system") as shown in Figure 8. Table 1 shows the summary of planning and optimisation practices used for strategic, tactical, and economic reasons with regard to EMSs.  Figure 8. Table 1 shows the summary of planning and optimisation practices used fo strategic, tactical, and economic reasons with regard to EMSs.

Power Management Systems (PMSs)
Power management systems are used in MG and NG applications to constantly modify the DC bus voltage by balancing the demand and supply units through implementation of the ESS in the utility grids (in the case of grid-connected systems) [7].
For improving the MG operations, the PMS helps in controlling the real and reactive power flow. The primary objective of the PMS is to ensure output power from distributed generators is balanced with the demand for load power [89].
The PMS can be used to fulfil different objectives such as power factor correction, voltage support, and transient power support. The major electrical parameters used in the PMS are current, voltage, and power, which directly affect the operational conditions of the MG system.

Power Management System Techniques
PMS techniques are classified into two types, i.e., optimisation techniques and artificial intelligence (AI) techniques. The PMS-based optimisation techniques generally involve a multi-objective function for maximising the efficiency of the MG, minimising fossil fuel consumption, and fulfilling the conditions of a successful operation [90]. On the other hand, the PMS-based AI techniques are used for real-time MG control. Furthermore, when the AI technique is used, the researchers do not understand the exact mathematical model for every DG in the MG.
Different algorithms based on the PMS optimisation and AI techniques were discussed to determine the optimal operation for assessing the reliability of the MG supply system and offering stability and resilience to it [91]. The following subsections categorise and describe the various solutions and planning methodologies that are used for strategic and tactical purposes in the PMS.

Power Management Systems Based on Optimisation Techniques
In [92], the researchers proposed a two-stage real-time demand-side management solution for the MG system that consisted of a combined WT and PV potential (1.2 MW) with a load ≤1 MW. A novel MPC optimisation scheme was proposed for reducing the For a short-time resolution that was based on the complicated optimisation process, the researchers calculated the real-time power allocation in line with the real-time errors associated with some unknown factors. The role played by the grid support was based on the stationary and mobile (EV) ESS, which could result in a storage space of up to 3 MWh. This could be managed using an internal pricing scheme for a permanent power balance and simultaneous cost minimisation. The researchers tested the adequacy of their proposed technique using detailed simulations in various MG case studies.
A real-time MPC-based PMS technique was also proposed for the grid-connected MG system that included WTs, solar PVs, and battery storage [93]. In this study, the researchers aimed to minimise the energy costs and maximise the life span of the batteries. The results of the study indicated that the proposed PMS scheme helped in decreasing the energy system costs and maximising the battery life span by 1.5 years.
Another optimal MPC-based PMS technique was proposed in [94] for the gridconnected MG systems that included PVs, fuel cells, an electrolyser, and batteries. The objective function of this technique was minimising the use of traditional energy sources, saving energy after using RESs, and quality and economic factors using HESSs. The results indicated that the algorithm allowed the smooth operation of the MG system, however, the life span of the ESDs was increased.
In [95], the researchers developed a real-time stochastic linear programming-based PMS technique for the hybrid MG system that included combined heat power (CHP) generation, 80 kW wind turbines, 180 kW microturbines, 200 kW boilers, and 100 kW solar PV generators. The algorithm proposed in this study helped in minimising the emissions, overall costs, and demand payments. The total MG costs were highlighted as the function of maintenance, operating, and constant costs on the generation side, while on the demand side, they were the function of critical, thermal, and normal load costs. For maintaining the load balance and discouraging any curtailment, the researchers followed the load-related restrictions for every time interval. They could achieve an 11% cost saving when they implemented a deterministic strategy, whereas the emissions were decreased by 1.5%; however, no variations were noted in the demand prices.
In [96], the researchers proposed a Lyapunov optimisation-based PMS technique for the grid-connected MG system that included RESs and an ESS. This algorithm enabled the minimisation of operational costs of the MG and maintained the outage possibility for quality usage. Furthermore, quality of service (QoS) and energy storage were regarded as prime factors for resolving the optimisation issue. The results of the study indicated that this algorithm could minimise the energy storage costs by 60% and further improved the QoS.
Another simultaneous perturbation stochastic approximation (SPSA)-based PMS technique was presented for the residential MG system that included solar PVs and an HESS (mechanical flywheel and battery storage). The algorithm proposed in this study aimed to acquire a smooth battery power profile and decrease the grid energy exchange. The researchers used actual power records that were related to the demand and PV output to verify the proposed SPSA algorithm. They compared this algorithm to the deterministic power management scheme and noted that their SPSA approach showed a higher success rate (99% of the time) and could preserve the instantaneous current variance that was allocated to the battery at values below 1 A. It also improved the independence of the MG resources by enhancing the utilisation of the hybrid ESS [97].
In [98], the researchers developed a dynamic PMS technique for the independent hybrid AC/DC MG system that consisted of fuel cells, battery banks, PVs, and an ultracapacitor. It was seen that this PMS generated a real-time reference to the converter current controller that was associated with battery banks, fuel cells, and an ultracapacitor with the help of the moving average filter. The efficiency of the moving average filter was noted in the experimental results and simulations. The mean current reference was divided into the fuel cells and battery banks when it efficiently transmitted the oscillatory and transient demand devices to an ultracapacitor.

Power Management Systems Based on Artificial Intelligence Techniques
A novel fuzzy logic-based PMS technique was presented for the remote MG system that included wind, PV, and diesel generators. The main objective of this technique was to improve the reliability of the system, increase the RES integration, and enhance the reactive and active power performance of the MG system with the help of AI algorithms. The researchers assessed the performance of their proposed PMS technique with regard to the regulation of the active and reactive powers. For sharing a diesel generator based on the fuzzy logic for the active and reactive powers, the researchers proposed two simulation scenarios. The first scenario was based on the stepped solar irradiation and wind speed profiles, while scenario 2 was based on the solar irradiation and wind speed continuous profile. Results showed that this algorithm achieved better stability and reliability of the MG system. Furthermore, the active and reactive power control algorithm showed a faster response to various activities related to the remote MG, such as frequency and rapid voltage fluctuations related to the AC link system [99].
A novel multi-agent-based PMS was presented for the AC-MG system that included PV, wind, fuel cells, microturbines, and battery storage for ensuring a safe, efficient, economical, and reliable operation of the MG system. For stabilising the distributed devices, the researchers obtained the system information regarding the average frequency and voltage using an iterative consensus algorithm. They could acquire an optimal controller using a three-level control, where level one was responsible for tracking of the associated reference components. Level two helped in optimising the voltage and frequency references of droop control and further shared the reactive and active power based on the demand. Level three aimed for optimal scheduling. In this study, the researchers considered all factors such as emission pollution, fuel consumption, and operational maintenance [100].
In [101], the researchers proposed and implemented an artificial neural network (ANN)-based PMS technique for the standalone DC MG system that included a battery, supercapacitors, and PVs. The researchers aimed to control the DC bus voltage and manage the amount of power shared between the load and MG. They noted that this algorithm showed a better DC bus voltage regulation (2.83 V, it satisfied the general 5% allowed range), and improved power-sharing. Furthermore, all results could be experimentally verified using the hardware-in-loop (HIL) on the real-time simulator from OPAL-RT Technologies.
Another ANN-based PMS was proposed in [102] for the standalone MG that included batteries, PVs, and supercapacitors. The objective function of the study was to minimise stress on the battery storage and maximise its lifespan. A PV model can be used for validating and assessing the performance of the algorithm. The researchers noted that this technique improved the life span of the battery as it could decrease the dynamic stress and peak current. Additionally, it maximised the supercapacitor utilisation.
Another ANN-based PMS was proposed for an on-grid/off-grid MG that included wind, PV, fuel cells, an electrolyser, and battery storage. It was developed to manage the output of the fuel cell and an electrolyser was used for maintaining the charge of a battery within a constant range. The simulation results indicated that this algorithm displayed a fast response ability compared to the traditional techniques [103].
Globally, large and small research groups have started to take an interest in PMS for MG and NG systems. In the IEEE and Elsevier database, this can be observed via the keyword search ("microgrid" OR "nanogrid") and ("power management system") as shown in Figure 9. Table 2 shows the summary of planning and optimisation practices used for strategic, tactical, and economic reasons with regard to PMS.

Comparison between Energy Management Systems (EMSs) and Power Management Systems (PMSs) Based on Architecture and Control Strategies
The EMS and the PMS techniques used for the MG and NG systems have differing management tasks and time scales. In the case of the EMS, the major factors that need to be considered are operational costs, fuel costs, maintenance costs, MG device lifetimes, etc., while the major factors in the PMS include the voltage, current, and power, which can directly affect the operational conditions [7].
In the case of the islanded MG, the EMS played a vital role as it maintained the DC bus voltage, power quality, and constant energy feed to the load. On the other hand, in a grid-connected MG system, the EMS is supported by the main grid that feeds the load during any interruption that takes place in a DG. Furthermore, the PMS helps in optimising the dynamic response of the MG under various conditions of load. It can resolve several issues in the MG such as providing a smooth transition from islanded modes to grid-connected modes, and vice versa. This allows a maximal utilisation of the RES and improves the stability in the MG systems when some devices are connected/disconnected either from or into the system [104]. Figure 10 displays the construction of EMSs and PMSs for interconnected MGs.

Comparison between Energy Management Systems (EMSs) and Power Management Systems (PMSs) Based on Architecture and Control Strategies
The EMS and the PMS techniques used for the MG and NG systems have differing management tasks and time scales. In the case of the EMS, the major factors that need to be considered are operational costs, fuel costs, maintenance costs, MG device lifetimes, etc., while the major factors in the PMS include the voltage, current, and power, which can directly affect the operational conditions [7].
In the case of the islanded MG, the EMS played a vital role as it maintained the DC bus voltage, power quality, and constant energy feed to the load. On the other hand, in a grid-connected MG system, the EMS is supported by the main grid that feeds the load during any interruption that takes place in a DG. Furthermore, the PMS helps in optimising the dynamic response of the MG under various conditions of load. It can resolve several issues in the MG such as providing a smooth transition from islanded modes to gridconnected modes, and vice versa. This allows a maximal utilisation of the RES and improves the stability in the MG systems when some devices are connected/disconnected either from or into the system [104]. Figure 10 displays the construction of EMSs and PMSs for interconnected MGs. Many researchers developed control strategies for managing the MG energy in the grid or island-connected modes. Table 3 presents a comparison between the EMS and PMS based on control techniques used for operational purposes.

References
Strategies Power Management Energy Management Many researchers developed control strategies for managing the MG energy in the grid or island-connected modes. Table 3 presents a comparison between the EMS and PMS based on control techniques used for operational purposes. Table 3. A comparison between the EMS and PMS techniques based on control strategies.

References
Strategies Power Management Energy Management [7,105] Centralised Control Based on PMS a centralised controller, developed for optimising low-voltage distribution network. The optimisation was carried out for the interconnected operations to maximise power exchange using the major distribution grid and optimise the output power for the local distributed generations (DGs).
A smart EMS (SEMS) for reducing the operational costs of MGs via optimal coordination of power production for DGs and ESSs. The researchers considered all economic and technical constraints for system development such as ESS management, power forecasting, economic load dispatch, and operational costs. A decentralised EMS for electric vehicle (EV) charging stations to control the flow of energy between the grid and MG. The DC bus voltage was a vital parameter for controlling the system. For maintaining the bus voltage at its reference value, the MPC is used for monitoring the SOC battery. The battery SOC presents the mode of PV operations, i.e., bus voltage sustaining mode, maximum power point tracking mode, or support of grid mode. [108,109] Distributed Control A power distributed control process was proposed for sharing the load power in proportion to the distributed source ratings. Based on the instant power of the DGs, a voltage shift was applied to the DC bus voltage to compensate the voltage loss because of the droop controller and maintain the stability of the DC bus voltage irrespective of any changes in the load.
An EMS was developed for managing the HESS. The researchers proposed a new architecture based on the multi-agent system solution for applying important and sensitive loads. [110,111] Hierarchical Control A solid-state transformer (SST)-enabled hierarchical PMS. The researchers assigned three-level functions, i.e., DC bus voltage recovery, local control, and controlling the SOC of the battery for each level. The MG operates reliably in the independent mode by using a primary control. The SST is seamlessly transferred via the enabled mode through a secondary control. An EMS based on 2 level controls for the MG system composed of the ESS and PV was proposed. It aimed to manage the battery charging and discharging activities to prevent overcharging and discharging, and control SOC equalisation.

Limitations and Challenges
Though the EMS and the PMS improve the efficiency of any system in a distribution scheme, they display some limitations such as power fluctuations between the MG and main grid due to the intermittency of the RES generation and the presence of stochastic loads that can negatively affect the reliability and stability of the power grids. Hence, a decrease in these power fluctuations was desirable. In order to achieve this, researchers needed to consider many things during the development of an EMS, including state of charge, losses of power in the storage devices, response times, and power prediction of the DG.
Power management was the main principle involved in the continuous adjustment of the DC bus voltage. This continuous adjustment can be achieved by controlling the power consumption and power generation units using an efficient ESS and the utility grid (when it is grid connected). However, the stability and flexibility of the MG-PMS are still lacking. Additionally, the regulation of DC bus voltage, current, and power-sharing amongst the MG and NG systems require further investigation.
Though a few research studies have developed strategies for regulating CO 2 emissions, a huge gap exists between energy efficiency and energy objectives. Thus, for minimising CO 2 emissions and improving sustainable economic growth, efficient and workable mitigation strategies must be developed.
The stochastic nature pertaining to the installed RES generators needs to be managed via optimisation methods by guaranteeing that a reliable supply of power is maintained for the consumers while also maintaining acceptable operation conditions for the electricity bill, storage system, and occupants' comfort. Thus, selecting the EMS and PMS methods is crucial to maintain stable and reliable operation for NG and MG systems. A PMS and/or EMS can be chosen based on the properties of the deployed system (e.g., operation modes, topologies, and structure). However, deploying an approach does not necessarily denote that the others are deemed to be unreliable. The main issue for the studied constraints as well as the fixed objective pertaining to the control strategy would be to identify the utility with regard to the deployed method.
Furthermore, there needs to be an EMS control strategy that accounts for the maximisation of the battery life cycle as well as electricity price variation. These two issues enable maximising the system profitability by reducing the electricity bill and remove the need to replace the battery storage frequently in the NG and MG systems. The key idea here is to create a predictive and intelligent control strategy that allows for controlling the distributed resources optimally in the NG and MG systems by taking into account multiple constraints and objective functions simultaneously.

Conclusions
In general, this review defines the NG and MG configurations along with RESs such as wind and PV and ESDs such as batteries and ultracapacitors. Moreover, the researchers have given an elaborate review regarding the recently published studies focused on EMS and PMS applications in MG and NG systems. Moreover, the review stressed planning and optimisation methodologies employed for economic, strategic, and tactical purposes. The selection of these methodologies was carried out by considering their reliability, practicality, and resource availability with regard to the NG and MG environments. Additionally, they have presented an overview of recent EMS and PMS techniques based on the control objectives such as distributed, centralised, decentralised, and hierarchical strategies. They also highlighted the major differences between the EMS and PMS approaches. The EMS in the MG and NG system deals with economic objectives such as minimisation of the system operational costs including emission costs, fuel costs, battery degradation costs, etc., to increase the life span of MG devices. On the other hand, the PMS tackles technical objectives such as improving the flexibility, stability, reliability, and quality of MG and NG applications. Lastly, all limitations, contributions, and challenges affecting this research topic have been discussed.