Artificial intelligence applications for microgrids integration and management of hybrid renewable energy sources

The integration of renewable energy sources (RESs) has become more attractive to provide electricity to rural and remote areas, which increases the reliability and sustainability of the electrical system, particularly for areas where electricity extension is difficult. Despite this, the integration of hybrid RESs is accompanied by many problems as a result of the intermittent and unstable nature of RESs. The extant literature has discussed the integration of RESs, but it is not comprehensive enough to clarify all the factors that affect the integration of RESs. In this paper, a comprehensive review is made of the integration of RESs. This review includes various combinations of integrated systems, integration schemes, integration requirements, microgrid communication challenges, as well as artificial intelligence used in the integration. In addition, the review comprehensively presents the potential challenges arising from integrating renewable resources with the grid and the control strategies used. The classifications developed in this review facilitate the integration improvement process. This paper also discusses the various optimization techniques used to reduce the total cost of integrated energy sources. In addition, it examines the use of up-to-date methods to improve the performance of the electrical grid. A case study is conducted to analyze the impact of using artificial intelligence when integrating RESs. The results of the case study prove that the use of artificial intelligence helps to improve the accuracy of operation to provide effective and accurate prediction control of the integrated system. Various optimization techniques are combined with ANN to select the best hybrid model. PSO has the fast convergence rate for reaching to the minimum errors as the Normalized Mean Square Error (NMSE) percentage reaches 1.10% in 3367.50 s.


Introduction
Currently, the world is suffering from many problems caused by the use of traditional energy sources, one of the worst of these problems is global warming, which leads to many climate changes. Therefore, there is a trend currently to rely on renewable sources instead of using traditional sources as a result of the continued depletion of traditional energy resources and global worry about environmental pollution. RESs produce clean energy and do not cause any negative impact on the environment compared to traditional sources. But many problems have arisen as a result of the irregular production of energy from renewable sources as a result of their unstable nature and fluctuations. Therefore, researchers sought to integrate renewable sources together in isolated microgrids to feed remote areas far from the main electrical grid, or to integrate them with the grid to increase reliability and stability. The integration of RESs has gained great strategic importance to solve energy problems. Integrating the sources together is an ideal solution to this problem due to the different nature of RESs and the various factors on which RESs depend for energy production . However, the integration of sources is faced with many problems and challenges that must be overcome to reduce energy losses.
Many studies discuss the integration of RESs using different techniques. Among these techniques, the Buck-Boost converter was used to create a controller that integrates the sources together. A study discussed the possibility of integrating wind, solar and wave energies together using Buck-Boost converter. This has been implemented in practice and has been validated by implementing it in a MATLAB/Simulink environment. The results obtained proved the high efficiency of the proposed system and its ability to respond to various changes . Another study was conducted to integrate fuel cells, solar cells and wave energy. The results obtained from MATLAB/Simulink and compared with practical experiments prove the effectiveness of this technique in integrating the sources together (Talaat et al. 2021). Another study has been performed discussing the integration of renewable resources and then calculating the resulting operational reserve. Infer from this study the economic feasibility achieved by integrating RESs (Talaat et al. 2020).
Other techniques are used to control the integration of different RESs such as the use of fuzzy logic. A fuzzy logic controller has been developed to integrate RESs. Also, it has been used to manage the energy generated from the three sources and control the flow of energy. The results obtained indicated the effectiveness of this system and its ability to manage the energy flow from wind energy, PV system and diesel generator (Jemaa et al. 2018). An adaptive fuzzy logic controller has been developed to controls many energy storage systems (ESSs) integrated together with the hybrid system. This controller reduces the number of charging and discharging times, thus increasing the life span and preserving these systems. The results obtained prove the ability of this adaptive controller to enhance the system efficiency compared to the traditional systems based on fuzzy logic (Sinha and Bajpai 2020).
It is very necessary to add storage systems to the integrated systems in order to give the electrical system more reliability and high performance. The excess energy that is produced from the integrated sources is used to charge the batteries and then this stored energy is used to charge the batteries when needed in the event of a production shortage. For demand-side and energy flow management an energy management system is used and takes into account the economic aspects, operational constraints, and the fulfillment of supply and demand (Elkholy et al. 2022a).
Smart grids are considered the future of electrical energy in the world. RESs such as the sun, wind and waves are integrated into these grids. These grids are based on hybrid renewable energy systems. To make smart grids more reliable, many sources are integrated together. An overview of smart grids is presented with some of the cases that have been studied. Based on these studies, the future requirements for smart grids were reviewed. Some of the challenges facing the integration of RESs in smart grids were discussed, such as voltage fluctuation, demand-side management, forecasting, storage systems, and systems flexibility and reliability (Failed 2010a). Artificial intelligence has been used in some studies to design a powerful monitoring network to constantly monitor the microgrid and predict the demand and energy produced in order to make the right decision. Data is collected and then analyzed to make the appropriate decision (Joseph and Jea 2017;Zhang et al. 2018a).
A study was conducted presenting the techniques used for the optimal planning and design of integrated RESs for microgrid applications. This study also analyzed the economic benefits of choosing the optimal location for distributed energy resources, as these analyzes are very necessary in order to make the most from the RESs (Jung and Villaran 2017). The optimal planning of a radial distribution system was presented using artificial intelligence, taking into account PV distributed generators. The study relied on the use of a hybrid optimization technique that combines the phasor particle swarm optimization and the gravitational algorithm. It was clear from the results that optimal planning helps in reducing power loss and improve the system voltage profile Ullah et al. (2020). An intelligent power system was considered in which consumers share a common energy source. Each consumer is equipped with a home energy management controller for scheduling as well as a smart meter. A set of optimization algorithms were used to shave the peak while maintaining consumer comfort (Iqbal et al. 2018). A comprehensive survey has been performed on the use of deep learning methods for power load forecasting in addition to PV and wind power forecasting in smart microgrids (Aslam et al. 2021).
ESSs have a major role in increasing the reliability of microgrids and improving energy quality in addition to eliminating the problem of non-continuity of energy production from energy sources as a result of its association with the surrounding weather conditions. Several reviews have been made regarding the integration of ESSs with RESs. The study discussed the integration of more than one ESS to form a hybrid ESS, as the capacity of one source may not be sufficient to cover the required load. A group of various configurations of a hybrid ESS were presented in this study. The total cost and method of control were taken into account. It presented an overview of the latest hybrid systems and methods for sizing capacity (Hajiaghasi et al. 2019). Energy management is one of the most important factors affecting the quality of electrical power systems, so many studies are being conducted on this matter. A review was conducted to survey research focused on energy management for hybrid power systems. The survey included the electronic devices Flexible AC transmission system (FACTS) used in the management process, as well as ESSs (Kumar et al. 2020). The use of optimization is very important in order to reach the best performance of the electrical network. A study was conducted highlighting the use of optimization with hybrid renewable energy systems to integrate different sources. This study reviewed the modelling and applications of hybrid renewable energy systems generation and ESSs (Fathima and Palanisamy 2015). In this paper, a comprehensive literature review on the methods of integrating RESs and the challenges that face this process is presented. The paper aims to gather as much information as possible from newly published research on that point. It focuses on many important points that help improve the quality of electric power systems and improve the integration process, such as the use of artificial intelligence 1 3 applications to integrate small networks and the management of hybrid RESs. One of the points that this paper also focuses on is the impact of the quality and robustness of communication systems on the performance of the integrated system, where a comprehensive review is made on that point. A case study is conducted on the use of artificial intelligence to integrate three energy sources, namely wind, wave and solar energy. More than one hybrid optimization model has been applied to determine the most accurate and capable of them to reach the lowest NMSE percentage in the least time.
This review paper is organized into twelve sections. The second section discusses renewable energy system integration where various combinations of integrated systems are presented. The third section displays various schemes of integration which are categorized as DC coupled, AC coupled, and AC/DC coupled. Section four explains renewable energy systems integration requirements. The integration of RESs with the main grid is then discussed in section number five, while in section number six the microgrid communication challenges are analyzed. Next, the artificial intelligence search methods used in the process of controlling integrated systems are shown in the seventh section. In the eighth section, the use of the artificial intelligence approaches in response to the demand is presented. In the ninth section, prediction techniques based on artificial intelligence are presented, while the tenth section includes a case study illustrating the use of artificial intelligence to improve the performance of integrated RESs. In the eleventh section, a discussion is being made to display the points extracted from the topic are presented. Finally, the conclusion is presented in the final section.

Renewable energy system integration
Global warming is one of the most common problems facing societies today. Therefore, green energy is the best solution to face this important issue (Baral and Xydis 2021). Wind, wave, solar and biomass sources are the most prevalent and fastest-growing sources at the present time, especially solar energy (Dawoud 2021). Wave energy is also one of the most promising sources, whose development has begun recently (Talaat et al. , 2021(Talaat et al. , 2020. Most of the recent research studies the possibility of integrating more than one source together so that one compensates for the other if the source cannot produce energy throughout the whole day. For example, wind energy is produced only if the wind speed is appropriate for energy production according to the power curve of the used wind turbine (WT), while at times when the speed is not suitable for energy production, another source such as solar energy is used. Sometimes at night, the wind speed is not suitable for energy production and there is no irradiation, so another source must be used, such as wave energy or any other source. Some of these systems are on-grid and others are off-grid (Ortega-Arriaga et al. 2021;Elkholy et al. 2022b). Table 1 shows the integration of different RESs and the objectives of each study.

Various combinations of integrated systems
There are various combinations of integrated RESs that are selected according to the nature of the place and the surrounding weather conditions. The sources in the hybrid system must be chosen so that each source can compensate the shortage in production of the other, specifically in times when it is difficult for one of the sources to produce energy. The integration of RESs can effectively contribute to overcoming the obstacles  Table 2 represents different combinations of the RES integration. Generally, the integrated sources in the microgrids are supported by the energy storage unit to give the integrated system more flexibility and reliability as it maintains the safe and efficient operation of the microgrid (Wali, et al. 2021;Prajapati and Mahajan 2021). The development of new technologies for integrating RESs has facilitated the process of creating new combinations of RESs which have different natures. These techniques helped in regulating the voltage and frequency of these combinations easier. According to some studies in International Renewable Energy Agency, the ESSs will increase by 42% to 68% in 2030, Also, India and China will be the two countries that have the most installations of ESSs (Abdalla, et al. 2021a).

PV-wind system
Solar and wind energies are among the most common and used sources in recent decades, compared to other sources. Solar energy is available during the day, as solar radiation increases at the beginning of the day and then begins to decrease gradually throughout the day until it is completely absent at nightfall. Solar radiation is more intense in some seasons compared to the rest of the seasons, as it is more intense in summer and autumn than in other seasons. On the contrary, wind energy is available throughout the day, but at some times its speed is lower than the cut-in speed, and therefore there is no energy production at those times. Often, the speed decreases during the day and increases at night (Khare et al. 2016;Leung and Yang 2012). Despite the widespread of both wind and solar energy, the use of each of them alone is not feasible and does not suffice in terms of covering the loads. Looking at the nature of each of the two sources, it is clear that each of them complements the other, so they are among the most common integrated energy systems (Yao et al. 2020;Shaker et al. 2016). Despite the merging of the wind and solar energy together, there are still some problems in eliminating fluctuations in the produced energy completely, especially with systems that are not connected to the grid, where the integration process cannot be completely controlled. Also, as a result of the climatic conditions that control the production process, which may lead to a lack of quality of the electricity and a shortfall in production. Integrated PV and wind energy systems can be categorized into two categories: integrated systems with the grid and isolated systems from the grid. Selecting the appropriate system depends on the nature of the location, weather conditions, and the distance between the location and the main grid. Several literature reviews have been conducted discussing integrating the two sources together and the methods of integration, and researchers have presented many challenges and solutions to these problems (Khare et al. 2016).
Optimization methods can greatly contribute to solving integration problems and increasing the efficiency of the integrated system . A study was conducted to optimize the sizing of a hybrid system that combines wind and solar energy in the event that it is connected to the grid or isolated from the grid Luna-Rubio et al.
(2012) Several reviews of the grid connected (Weschenfelder et al. 2020) and off-grid systems (Jian et al. 2011) wind-solar hybrid system was conducted.

PV system-ESS
ESSs are integrated with solar energy systems to give the system more robustness and reliability by overcoming the intermittent problem of PV systems. As it is known, energy is produced from solar cells during the day only, so the energy is stored for use during the night and to meet the demand for loads at times when the production is not enough due to the presence of some clouds and clouds (Mariano, et al. 2021). The economics of ESSs has been discussed in many previous studies, and it is discussed in terms of the levelized cost of electricity (Lai and McCulloch 2017;Dong et al. 2021) and Net Present Value (Chaianong et al. 2020).
The economic feasibility of integrating photovoltaic sources and ESSs, which is an indicator to attract investments in Thailand and many other countries, was discussed (Chaianong et al. 2020;Sheeraz et al. 2010;Rodrigo et al. 2017). This study discusses the benefits of a hybrid system that combines ESS and solar cells. This study also predicts the status of battery investment in Thailand in the future (Chaianong et al. 2020).
Hybrid ESSs are used to feed rural areas disconnected from the grid. The PV system integrated with hybrid ESSs is one of the most promising systems in rural electricity, especially in areas far from the grid. Many reviews discussed these systems and also presented the ways that help to increase the life of the battery (Jing et al. 2018).

Wind system-ESS
Integrating the ESS with isolated wind systems or on-grid wind energy system gives the system more stability, flexibility, robustness and reliability. The ESS stores the surplus for use in times when the wind speed is low and there is no ability to cover all loads (Díaz-González et al. 2012;Failed 2014a;Gwabavu and Raji 2021). A sizing study of an integrated system combining wind energy and an ESS with a capacity of about 128 MW was presented. This power plant is located in the Nan'ao island region of China. This hybrid system was proposed to achieve a power balance during maintenance by adding an ESS to ensure continuity of service during these periods (Luo et al. 2014). A study was conducted in Hebei Province in China to overcome the fluctuations in the energy produced from wind energy in this region. This is done through the use of multi-objective optimization. Wind energy is combined with an ESS in an isolated microgrid .
A study was made to improve the data of the ESS to increase the efficiency and lifespan of the batteries and the effect on the system integrated with it. This ESS is combined with a wind power plant. The proposed system maintains operating constraints even in the presence of some faults in order to ensure the continuity of feeding with a shortage of generation. Nine evolutionary algorithms are used to design the intelligent backup ESS (Sakipour and Abdi 2020). A study was conducted based on the use of HESS that combines batteries and super-capacitors with a wind power plant. A multi-objective optimization algorithm was used for sizing the HESS (Pan et al. 2021). A study was made in Qinghai Province, China, on the grid connected 99 MW Caka wind plant. This study relied on establishing a multi-objective life cycle model which used in the power plant. Through the results, the researchers obtained the optimal HESS and proved that it was better than a single ESS (Rui et al. 2021).

PV system-wind system-ESS
Both wind and solar energy sources are integrated together and an ESS is added to them to give the system more flexibility and reliability. Both sources depend on the weather condition and not all of them produce usable energy throughout the whole year so the storage system stores the surplus in times of increased wind and solar cells production to be used in peak times or when there is a shortage. There are many papers discussing the optimum size of this integrated system (Yang et al. 2018;Anoune et al. 2018;Chennaif et al. 2021) as well as the energy management of this system (Majumder et al. 2021;Stroe et al. 2018).
A new study was conducted using particle swarm with the genetic algorithm (GA-PSO) to reduce the overall cost and increase the reliability of a system consisting of PV, wind energy and ESS (Ghorbani et al. 2018a). A study was conducted that proposes a new approach to find the optimum size for a hybrid system consisting of solar cells, wind and HESS. In addition, frequency management was done using the Discrete Fourier Transform algorithm. Work has also been done to reduce the total cost (Abdelkader et al. 2018).

Renewable energy systems integration requirements
In this section, recent developments related to integrating RESs with the electrical grid are discussed to make the electrical system more reliable. Focusing on voltage ride-through (VRT) and the injection or absorption of the reactive current, which in turn helps support effort during disturbances and in unusual circumstances. In addition, the relationship between active and reactive energy is studied.

Voltage ride-through
VRT is considered one of the most important requirements for the process of integrating the sources as a result of the high penetration of renewable power plants. In recent decades, the low integration of RESs has allowed direct disconnection from the grid if there is a grid fault. Although, the disconnection of RESs, which has become a key factor in electrical grids, may exacerbate the problem and instability. Based on that, most of the current regulations imposed VRT as a prerequisite for any integration between RESs and the grid. The VRT requires that the renewable power plant be always connected to the grid even during faults as it acts as conventional power sources to ensure the stability of the system (Al-Shetwi et al. 2020).

Low-voltage ride-through (LVRT)
In large scale systems, disconnecting a renewable power plant can negatively affect network stability. In the past, researchers focused on studying LVRT control strategies for use in wind and solar energy systems. The main purpose of these strategies is to inject reactive power into the grid. The LVRT requirement is a requirement of grid code regulations. The requirements vary depending on the duration of the fault and the amount of reactive power injection. They ensure that the system operates properly when a voltage drop occurs as the grid can restore voltage by supplying reactive current in the specified voltage range. Therefore, it is necessary to control the reactive current in the specified voltage range (Bak et al. 2018). The LVRT requirements of different countries is shown in Fig. 1 (Al-Shetwi et al. 2020).

Zero-voltage ride-through (ZVRT)
ZVRT is a special case of LVRT where the voltage drops to zero. Accordingly, RESs stay connected and support the grid for a particular period of time. The ZVRT helps to maintain the stability of the grid and restore voltage as with the LVRT. Figure 2 shows the required ZVRT coefficients for a group of countries (Zhang et al. 2017).

High-voltage ride-through (HVRT)
Integration requirements need that RESs remain connected to the grid once the voltage is increased to maintain voltage stability and avoid critical disturbances to maintain the system stability and avoid the occurrence of disturbances caused by overvoltage. The HVRT is responsible for handling faults that occur on the grid as a result of high voltage. The function is activated when the voltage rises above the permissible limit set by the local power company (Al-Shetwi et al. 2020).

Configuration schemes
The various schemes of integration are categorized into three different categories namely DC-coupled, AC-coupled, and mixed coupled. The type of configuration that is applied to the system is based on the allocation and it is considered a very remarkable criteria for choosing the appropriate type of integration between renewable energy systems and traditional energy sources. The process of selecting sources depends on several factors, the most important of which are the demand for electrical energy, the availability of those sources, the cost of storage and many other things. Table 3 shows the different integration schemes in connected and isolated microgrids (Veena et al. 2014). The integration schemes and the conditions for using each one of them are discussed below.

AC/DC-coupled microgrid systems
There are many microgrid configurations that contain many RESs (Yeshalem and Khan 2017). In particular, there are three very important configurations, which are discussed below.

AC coupled microgrid
Various RESs and ESSs in this configuration are connected on an AC bus with the load. The DC sources such as fuel cells, solar, batteries, wind with DC generator, etc. are linked with the AC bus through DC/AC converters. Similarly, for loads that need DC to operate, this is done through AC/DC converters in order to be linked to the bus. The AC coupling is simple and reliable for on-grid systems. It has a more mature architecture with lower development costs. On the other hand, AC coupling needs more complex control algorithms. Other disadvantages of this system are fluctuations in voltage and frequency, poor power factor in addition to the harmonic distortion (Failed 2016). There are many advantages that the AC microgrid has, such as the use of a high-efficiency transformer, which facilitates the process of reducing and raising the voltage according to the voltage required to feed the loads. In the event of any malfunction, the AC loads can be fed directly from the main grid without any malfunction as a result of the disturbances. On the contrary, there are some disadvantages to the AC microgrid, such as converting AC power to DC power for the devices that need DC power such as batteries, which lead to reducing the efficiency, in addition to harmonics produced due to the power electronics converter in the main grid Table 3 The different configuration schemes in connected and isolated microgrids References AC-Coupled DC-Coupled AC/DC- Design an optimal controller for a hybrid AC-DC coupled microgrid to enhance the grid performance. A complete model was implemented using MATLAB/Simulink (Dagar et al. 2021). There are two subcategories of the control strategies of this configuration which will be explained below:

Centralized AC-coupled microgrid
In this configuration, all components are connected to the AC bus as shown in Fig. 3. Sources that produce AC power are connected directly to the AC bus or AC/AC converters can be used, while sources that produce DC power use DC/AC converters. The inverter is used to control the power flow from the batteries to the loads in the case of off-grid systems and in the case of grid connected systems, it is used to manage the power flow from the bus to the loads (Yeshalem and Khan 2018).

Decentralized AC-coupled microgrid
In this configuration, the microgrid components are not connected to any bus directly, but rather each source is separately connected to the load as shown in Fig. 4. In this type, it is not required that the sources be close to each other, but rather they may be far. Each source resides in the area where it has the possibility to produce energy, even if it is far from the load, and this is considered one of the advantages of this configuration. The centralized system is considered better than the decentralized system because of its ability to control the whole system (Yeshalem and Khan 2018).

DC coupled microgrid
In this configuration, all microgrid components are connected to a DC bus instead of on an AC bus. All DC sources are connected directly to the DC bus or through a DC/DC converter. On the other hand, all AC sources are connected to the DC bus through AC/ DC converter as shown in Fig. 5. The disadvantage of this system is that the conversion efficiency is low, and its advantage is that the Charge controller protects the batteries from deep discharge and overcharging, and AC loads can be fed through the inverter. The use of the DC bus in microgrid reduces or avoids energy losses resulting from energy conversion (Siad 2019). Sensitive electronic loads are preferable to be fed through a DC microgrid (Yeshalem and Khan 2018;Salomonsson et al. 2009;Failed 2017b). The DC microgrid has some advantages such as ESSs can be connected directly without the need to convert Fig. 3 Centralized AC-coupled microgrid it to AC power, which leads to reduce the efficiency and thus improves system efficiency and ease of integration of RESs. On the contrary, its disadvantage is that most of the loads are AC and therefore there is a need to convert the DC power to AC power (Dagar et al. 2021). The control strategies in DC microgrids can be classified into two categories, basic control strategies and multi-level control strategies. These two classifications are discussed in detail in the following two sections (Kumar et al. 2019;Sen and Kumar 2018).

Mixed coupled microgrid
It is possible to combine both AC-and DC-coupled together in the microgrid. This configuration is called a mixed-coupled or hybrid coupled microgrid system. This configuration requires more coordination between the DC and AC sub grids. The mixed coupled microgrid attracts more interest than other configurations because it has the advantages of AC and DC configurations where two microgrids are integrated together in the same distribution grid, which leads to more effective and direct integration of both AC and DC loads. Some sources that produce AC power such as wind are linked to the AC bus while sources that produce DC power such as fuel cells, solar and batteries are linked to the DC bus as shown in Fig. 6. The advantages of the hybrid AC-DC microgrid are reducing the converting losses and increasing the microgrid reliability due to reducing converting from AC to DC and vice versa (Pourbehzadi et al. 2019). In addition, an inverter is not required and thus reduces the overall cost of the microgrid. The disadvantage of this configuration is that the configuration of this microgrid is more complicated compared to AC coupled and DC coupled microgrid (Dagar et al. 2021).

Basic control strategies
Basic control strategies are implemented through three different methods based on the communication levels. These methods are centralized control, decentralized control, and distributed control. The main factor that differentiates these methods from each other is

Centralized control
The distributed generators are controlled by a central controller. The information of the whole microgrid is gathered and send to the central controller as signals. The controller sends the information back as signals to regulate the operation of the microgrid. The quality of communication is one of the most important factors that ensure the high performance of the controller. This method is characterized by the strength of monitoring and control of the whole microgrid, but the disadvantage of this system is the lack of reliability and lack of flexibility. Master-slave control strategy is a model of centralized control system. A study was made to regulate the voltage of the DC bus. This study is based on the strategy of the master-slave where the ESS is considered the master while the remaining units are considered the slave used to regulate the power (Wu et al. 2015).

Decentralized control
In this type, the distributed sources are controlled through local controllers. This control strategy is characterized by reliability and more flexibility than the other strategy due to the presence of local controllers. However, there are some drawbacks due to the lack of data about the distributed generators (Failed 2017c). Decentralized control strategy was used to eliminate the fluctuation of the voltage for a PV based DC microgrid. The Fuel cell was used as a backup source with PV and battery. This control strategy was investigated using MATLAB/Simulink under different operating conditions (Biswas and Bajpai 2016).

Distributed control
This type combines the advantages of both centralized and decentralized control. Information is exchanged between different sources through local controllers. The advantage of this scheme is to give the microgrid more reliability and flexibility in the event of a fault in the communication between some sources the system can keep full functionary. The main drawback of this scheme is the voltage deviation and the analytical performance is complex. Consensus and agent-based control strategies are considered examples of this control strategy. Consensus control strategy represents the information exchange protocol between the units as it is considered flexible control strategy (Yazdanian and Mehrizi-Sani 2014). Agent based control strategy is one of the most widely used strategies. Where each source represents an agent in the DC microgrid. Thus, there are many agents and therefore it can be called multi agent control (Wooldridge 2009).

Multi-level control
Modern renewable energy systems need higher smart control systems to achieve many objectives together, such as controlling voltage, current, and power, and reducing the total cost of operation. It is difficult to achieve these goals and others needed by modern energy systems through centralized, decentralized and distributed control. Therefore, multi-level control is used in the DC microgrid (Failed 2013a). As a result of recent developments in communication methods, the use of multi-level control has become a necessity for DC microgrid, as it provides more independence and reliability as it ensures the continuity of the operation even with the occurrence of faults at the upper level (Kumar et al. 2019).

Series/parallel microgrid
The hybrid microgrid can also be classified by the way the demands are fed through (Yeshalem and Khan 2018;Failed 2018b). There are two classifications, series and parallel, which are discussed in detail below.

Series microgrid
In this configuration, all sources are made to feed the batteries, as DC sources such as solar, fuel cells and diesel generator feed the batteries directly. All components except diesel generator are equipped with a charge controller which protects the batteries from overcharging as well as preventing deep discharge. Then, the inverter is used for converting the DC power to the AC power to feed the loads (Failed 2018b).

Parallel microgrid
In this configuration, the loads are fed and at the same time, the batteries are charged in parallel, where some sources are used to feed the loads directly and others are used to charge the batteries. Then, the batteries are used to feed the remaining loads. This type combines the AC-coupled and the DC-coupled configurations (Failed 2018b).

Integration of microgrid with the main grid
The integration of RESs to the main grid gives the electrical grid more reliability and flexibility. In addition, it helps to reduce the total cost. The grid-connected microgrid works with the utility grid as well as it can work separately isolated from the grid. It works to provide the surplus to the utility grid in the event of increased production and uses the grid for feeding when needed. RESs cannot continue to feed the grid continuously since they generate electricity only at times when the factors that help to produce energy are available.
Optimization is used to choose the optimal times for feeding the grid, or vice versa. Many artificial intelligence techniques are used to predict weather conditions and times when power is available, as well as times of peak loads that the grid cannot supply all loads. such as genetic algorithm (GA) and fuzzy logic (FL), in addition to artificial neural (ANN) and other modern technologies (Alblawi et al. 2019).

Power quality
The high penetration of RESs connected to the grid has a significant effect on the power quality of the grid due to the fluctuation of both voltage and frequency in addition to the harmonic. In addition, the irregularity of the energy production process from different RESs has a considerable effect on grid reliability. There are some solutions that can help to reduce this penetration and improve power quality, such as scheduling loads and predicting times when production failures occur. There are many techniques that are used to predict the weather, wind speed, and solar irradiation. optimal energy management to deal with times when production shortages occur is considered one of the best solutions to increase the power quality of the grid. In addition to that, distributing RESs in different areas and establishing small units of RESs is better than using one large unit in a specific area as it can be a solution to the problem of penetration. The use of an ESS can help to maintain stable energy production (Failed 2019a).

Microgrid communication challenges
The means of communication are one of the most significant issues affecting the integration of RESs and the implementation of a microgrid that has more reliability and flexibility. Strong and reliable communications facilitate greater control between embedded systems and broader energy management. In the modern microgrid, many advanced communication systems have been adopted, such as optical fibers and wireless (Failed 2014b).
In the hybrid AC-DC converter, the communication system between interlinked converters is very critical. Coordination is one of the most important challenges facing communication challenges to obtain more reliability. In modern microgrids, designing a reliable and robust communication is a top priority (Noh et al. 2019). Attention to the infrastructure for communication between the components of the integrated system is one of the most crucial elements that affect microgrid efficiency. There are many used standards such as IEC 61850, ANSI C12.22, IEC 61499 and IEC 61850 standards (Failed 2012). The communication system in the microgrid can achieve the communication between the various controllers located on the integrated sources in the microgrid. It can monitor other remote microgrids to achieve remote monitoring. Achieving the connection between the various microgrids makes full use of the RESs and improves the microgrids economy. The use of communication means within the microgrids is very necessary to avoid the deviation of both voltage and frequency, in addition to that it allows economic optimization, which helps to provide the requirements of the loads at the lowest possible cost. There are different parameters on which the selection of the appropriate communication technology for the microgrids depends. The communication requirements of the microgrids are determined based on the design and the control architecture of the microgrid (Failed 2010b).

Wireless technologies
Wireless communication technologies are distinguished over wired technologies because they do not need a physical connection. In addition, it facilitates the installation of remote sources in remote areas, reduces the total cost of operation, and gives the possibility of expanding the microgrid in the future. Among these technologies that are used in many microgrids are WLAN, WiMAX, Zigbee and Bluetooth (Failed 2014c).

WLAN
WLAN protocol can also be called Wireless Ethernet. This protocol is characterized by the ability to provide strong communications with low latency, in addition, it is capable of point-to-point and point-to-multipoint transmission. It is preferred to be used in applications that require a smaller data rate and low interference environments. In microgrids, WLAN is used for many applications. It can enhance the protection of distribution substations by smart supervision and control using sensors. In some geographic areas where distributed generators are dispersed, wired communication is difficult to be used and therefore WLAN is a good alternative. WLAN distinguishes from wired LAN in installation as it provides mobility and reduces cost (Failed 2013b). WLAN is accompanied by many challenges such as electromagnetic interference, as devices that needs high voltage can cause slow down transmission and sometimes the signal can disappear completely. In addition, another challenge is interference with other wireless devices (Mahmood et al. 2015).

Zigbee
Recently, many wireless communication technologies have been spread. Among these technologies, Zigbee is widely spread in residential microgrids. ZigBee technology is widely used due to its advantages such as low cost, low energy consumption, simplicity, mobility and robustness in addition to being low in complexity working in the unlicensed band of 2.4 GHz (Elsied et al. 2016). It is commonly used in wireless sensor networks (WSNs), Due to its previously mentioned advantages. Moreover, it is among the integrated communication technologies used for metering equipment. Its physical layer supports three frequency bands. The first frequency band is 868 MHz with one channel. The second band is 915 MHz with 10 channels, while the third frequency band is 2.4 GHz with 16 channels.
There are some limitations that accompany the use of ZigBee such as less memory and processing power, problem in interference with other devices that use WiFi or Bluetooth (Failed 2021).

WiMAX
WiMAX is a fourth-generation wireless communications known as the local-loop which allows data to be received by microwave and transmission by radio waves. This protocol has a low latency of less than 100 ms for the round trip as well as scalability and lower operating costs. It is used in many applications such as wireless automatic meter reading, real time pricing, detection and restoration of outage, and monitoring. There are some challenges associated with WiMAX such as the high cost of radio equipment. In addition, the ideal location must be chosen so that infrastructure expenses are reduced and service quality requirements are met. WiMAX frequencies are around 410 GHz and are not able to pass through obstacles, therefore lower frequencies are better suited for advanced metering applications especially in urbanized areas (Failed 2013b).

Wired technologies
Wired technologies are preferred in the utility in the serviced areas, which facilitate access to high grid performance. It relies on the use of optical fibers and other technologies to transfer information between different sources. These technologies include Power line communication (PLC), Optical fiber, and Ethernet.

Power line communication
PLC uses the power transmission lines to transferer data. PLC technology depends on the use of power transmission lines to transmit data, where high-frequency signals are transmitted, whose frequency value ranges from a few KHZ to tens of MHZ. The initial cost of PLC is low compared to other technologies as it depends on the existing power transmission lines. This helps utility companies rely on one infrastructure for power and data transmission. The PLC uses this infrastructure to transfer high-speed (2-3 Mb/s) data signals between devices. This method is very reliable and has already been used for many decades to transfer data. It is also characterized by low latency and high throughput, which makes it a good option and available in smart grids in violently populated areas. However, PLC faces a number of challenges due to the turbulent interference from other power signals and nonlinear distortion (Tsampasis et al. 2016).

Optical fibers
Optical fibers technology is one of the fastest communication types in microgrid applications. The cost of communication through optical fibers is more than other technologies, despite that, it has many advantages such as long range and high data rate in addition to not being exposed to electromagnetic disturbances.

Ethernet
Ethernet is a wired communications technology commonly used in wide area network connections between substations and control centers. One of the most important features that distinguish this technology is its high reliability and is immune to noise. The disadvantage of this type is that it is intended for smaller networks with shorter distances and limited mobility. Plus, it is difficult to troubleshoot when trying to trace any particular cable (Abrahamsen et al. 2021b;Bian et al. 2014).

Artificial intelligent search methods
Since the previous decade, Artificial Intelligent (AI) approaches have surged into the energy sector as a potentially viable option to make optimal use of distributed energy resources and assist real-time and rapid demand response. AI methods are capable of providing far more reliable, efficient solutions to deal with the grid system's limitations and effectively manage the system and make timely decisions (Ali and Choi 2020). Various past research investigations demonstrate that the Integrated Renewable Energy System (IRES) system is frequently working at the highest capacity, and as a result, the system is rated as having a low value. Such a method may result in future system overproduction issues. As a result, scaling the IRES system should be done utilizing AI optimization technology while taking into account the existing situation. IRES is still dealing with a slew of issues that can be handled using AI. To harvest additional electricity, IRES requires cutting-edge technology. The less efficient power of IRES is overcoming these obstacles to its widespread use. Another concern is the reduction of the IRES installation cost, which necessitates a considerable lowering in the capital costs and consequently reducing the time to recovery. Soft electronic computing technologies should be employed to decrease power loss in power electronic equipment. It is feasible to expedite the life cycle of energy storage technologies using AI technology. The energy conversion in the IRES system will be reduced if a converter is not used. A hybrid system designed with DC-only or AConly components will be less expensive than one developed with DC-AC conversion. As a result, in order to size and regulate the hybrid system, AI techniques are necessary for energy management (Kanase-Patil et al. 2020).
This section briefly reviews the applications of artificial intelligence the combination of RES and ESS, demand response management, distributed grid intelligence, and home energy management.

Genetic algorithm (GA)
Since 1975, Holland has been one of the first to create heuristic techniques. Selection, crossover, mutation, and inheritance are examples of search techniques based on genetics and natural selection principles (Goldberg and Holland 1988). In distinction to other research strategies that concentrate on only one solution, GA allows a group of initial solutions to evolve into a state that optimizes "fitness" under defined selection parameters. In reality, the set of elements are internalized into the chromosomes that encode potential candidates, in order for them to develop toward a healthier condition. Solutions are traditionally expressed in a binary digest. The population at the beginning is produced at random besides assessing each candidate's suitability over generations. The chosen candidates are mutated in order to create new chromosomes. This step is still repeated until the maximum number of iterations is reached or achieves reasonable tolerance.
GA is one of the most extensively used optimization strategies for distributed generators (DG) placement and size (Borges and Falcão 2006;Goswami 2010, 2009;Popović et al. 2005;Shaaban et al. 2013;Singh et al. 2008Teng et al. 2007). GA was used in Soroudi et al. (2011) and Zangeneh et al. (2009) to reduce system expansion expenses while also increasing system dependability. Because these two goals are incompatible, Pareto-optimal models were employed to find the dominant solution in a single run. Also, a GA-based technique was presented for reducing daily overall operating costs in residences by installing various distributed grid (DG) units such as fuel cell and rooftop photovoltaic units at each house (Elkazaz et al. 2016). The GA technique improves the combination of pumped storage, solar, and wind systems based on system economics and environmental achievement (Abdelshafy et al. 2020). A GA is utilized for designing and developing hybrid diesel, wind, solar and ESSs for serving remote locations in Senegal. This research has two goals: one is economic, and the other is environmental. The first goal is to reduce the system's levelized cost, and the second is to reduce carbon dioxide emissions (Paulitschke et al. 2017). Table 5 compares the major disadvantages and advantages that GAs face.

Artificial neural network
The artificial neural network (ANN) is motivated the biological brain and interprets data similarly. The ANN is a network of artificial neurons performed for a specific application. Training determines the weight value of each neuron. By minimizing total errors and adjusting the weight along the gradient, ANN has enhanced the performance of back production methods. Due to their outstanding self-learning abilities and ability to perform with minimum knowledge, ANNs can handle multi-dimensional, non-linear, intricate systems. ANN methods are used in smart grid energy management systems for a variety of distributed resources, such as voltage stability monitoring, solar irradiance, control management, and even security concerns. ANNs have been effectively used in voltage stability monitoring (Venayagamoorthy 2011)  The CNN architecture is a well-known NN architecture. In the same way that CNNs are used in other applications like video and picture content analysis, they are now being used in energy system predictive maintenance. Image-based defect detection in energy systems is more effective using CNN. Shin et al. (2021) used a seven-layer CNN model for detecting WTs gearbox and bearing defects. Expert-annotated 150*150*3 microscopic pictures of the gearbox and bearings are used to create the model. Engineers can utilize the solution to help them analyze energy system faults. For early failure identification in WTs, Using SCADA data (Ulmer et al. 2020a), CNN architecture with one fully connected, 3 dropouts, and 4 convolutional layers, respectively is learned. Several more intriguing ideas use CNNs to forecast RE system maintenance Mohammadi et al. 2020;Helbing et al. 2018;Ulmer et al. 2020b;Zhang et al. 2020;Zare and Ayati 2021;.
The ANN takes into account system interaction while controlling the hybrid photovoltaic and wind for hydrogen and battery storage. The recommended ANN has a faster reaction capability than a FLC (Osmanaj and Selimaj 2014). For sizing and controlling a flow battery ESS integrated with a large wind farm, ANN-based on sizing and control methods is suggested in Brekken et al. (2010). The results show that: the system's rated power and energy sizing are affected by the power flow control method.

Particle swarm optimization (PSO)
Eberhart and Kennedy developed the optimization method called PSO in 1995 by motivating the social movement of birds or fish swarming's in finding their foods (Zhu 2008). The algorithm is initially fine-tuned using a group of temporary solutions called particles; those particles update their position and velocity throughout of generations in the specified search space. To refine the final solution, the particles share information about their locations based on their fitness value at each iteration, while their neighbors reveal the history of their "best" places (Bai and Zhao 2006). PSO has been frequently used in publications to tackle the challenge of locating and sizing DGs (El-Zonkoly and Computation 2011; Lalitha et al. 2010;Tautiva et al. 2009). For example, in Pandi et al. (2012), It is applied to find the ideal location, kind, and size of DG units for effective DG integration while keeping harmonic limits and protective constraints in mind. In addition, a PSO was used in Alinejad-Beromi et al. (2008) and Kansal et al. (2013) to enhance the voltage profile as well as minimize Total Harmonic Distortion (THD), losses, and expenses. When compared to the GA technique, the findings showed that PSO provided greater solution quality and required fewer iterations. In reality, PSO is faster than GA at computation and can be applied to electricity network applications. Some recent improved PSO techniques, such as IPSO (Yustra and Soeprijanto 2012), SLPSO (Arasi and Sasiraja 2015), BPSO (Su et al. 2011) and PSOCF (Sahoo et al. 2012), are presented for sizing and locating DG.
The PSO algorithm was used also in the EMS to save 29.4% on running costs, increase efficiency by 27.2%, and improve lifetime of system devices by 43.4% (García-Triviño et al. 2016). PSO power optimization with multiple objectives is presented. Furthermore, when compared to PV, hydro-PV system, thermal storage network,, and PV-batteries (Guo et al. 2020), The approach would enhance transmission channel utilization's stability and performance (Hao et al. 2019). Ensure that the ESS is not overworked and that they are not uninstalled. Second, after connecting the electrochemical storage systems power station to the power flow computation, voltage instability occurs. and for additional voltage instability adjustment, reactive power return on the bus line is used. In addition, a novel ESS control system for 100 megawatts was presented with a multi-agent design, and the control impact was validated by simulation analysis and testing (Zahedi and Ardehali 2020). Table 5 summarizes the key benefits and drawbacks of the PSO approach.

Fuzzy logic (FL)
In 1979, the FL controller was introduced as an extension of the traditional set approach for dealing with power system problems. In actuality, it includes supplying a number between 0 and 1 to determine an association function that comprises the amount of connection of each element. This function determines how closely any element matches a fuzzy subset. The most often used membership functions are the Gaussian, triangular, piecewise linear and trapezoidal functions. There is no limit to the number of memberships that can be held. FL is often utilized in the problem of DG allocation and size. For example, FL was used to address the best placement of DGs in the smart grid, with the goal of minimizing actual power losses and improving voltage profile (Abdmouleh et al. 2017). A key benefit of FL based methods is their excellent interpretability since the results of those approaches are comprehensible by persons. Because the rules and classes of fuzzy are established by human specialists, the system's capacity to be highly interpretable is reliant on its working mechanism. However, establishing such rule necessitates a thorough understanding of the area, that's one of its major drawbacks when compared to other AI approaches.
For RE system predictive maintenance, fuzzy logic-based techniques have been frequently used (Suganthi et al. 2015). On the basis of current magnitudes, Merabet et al. (2015) present a fuzzy logic-based paradigm for CBM and fault detection in WTs. A sixphase fuzzy logic-based approach was proposed by Fuming et al. (2020), with the goal of expanding language words and norms for a better description of the defect. To forecast error data, an ANN model is employed first, followed by data transformation and the development and expansion of language words and regulations. The fault detection findings are subsequently provided by the fuzzy inference step. Unlike previous approaches, the method's extension of linguistic words allows it to quantify the severity of the problem in the final step. By gathering transmission data using LabVIEW and CRIO tools, a fuzzy logic-based method for problem diagnosis and differentiating in power transmission lines is given in Adhikari et al. (2016). The authors also go into detail on how the method is implemented in hardware.
The membership of FLC abilities is intended to reduce power hybrid system running costs by employing frog-spring shuffle algorithms to forecast water, electricity, and environmental characteristics on a monthly and frequent basis. The results investigate that FLCs reduce fuel cell and electrical gas operating hours and decrease SOC variability in the battery stack (Athari and Ardehali 2016). Depending on the usage costs, the FLC proposed using a combination of wind and PV to store battery power. The recommended program decreases overall savings by 13% compared to the old conventional strategy (Garcia et al. 2013;Abdalla, et al. 2021b).

Simulated annealing (SA)
One of the most flexible and favored heuristic approaches for addressing complicated combinatorial problems is Simulated Annealing (SA) which is firstly presented by Gelatt and Vecchi 1983. The method was inspired by a metalworking technique called annealing, which describes the solidification and creation of crystals by slowly cooling material to their lowest energy state (Bagherian, et al. 2021). In actuality, it takes the shape of a probability function that permits optimal solution corresponds to a flawless crystal to pass, and a local optimum corresponds to a crystal with flaws to fail.
The usage of simulated annealing for details has been documented in many publications ("A Solution to the Problem of, SA is used to find and specify the DGs size of in the same time reducing the computational time when compared to GA and TS techniques (Aly et al. 2010;Sutthibun and Bhasaputra 2010). Furthermore, the SA technique is appropriate for optimization problems including specified reliability requirements. Power system design based on dependability, for example, resulted in the appropriate DG position and size while satisfying load demand with minimal network upgrading (Vallem and Mitra 2005). In addition, SA was used to enhance the voltage profile and decrease power losses (EL-Sayed et al. 2017). To regulate environmental emissions, decrease power system losses and uncertainty, a multi-objective simulated annealing algorithm was used to set the optimal DG (Sutthibun and Bhasaputra 2010). On an IEEE 30 bus, the model was compared to a system without DG and demonstrated an overall power savings reaches to 43%. In Dharageshwari and Nayanatara (2015) presented multi-objective optimum DG planning using simulated annealing to decrease power losses and enhance profile of voltage. The installation of numerous DG and testing on the IEEE 33 bus resulted in suitable rapid convergence, better system efficiency, lower system losses, and lower costs.
An enhanced version of SA was used in Velik and Nicolay (2014) to discover the best energy management strategy in a micro grid network with renewables integration and distributed generating capability. In micro grid networks, the goal of an optimum energy management approach is to maximize financial benefit while emphasizing distributed generation utilizing renewable energies. Similarly, A smart-grid network used SA for day-ahead resource scheduling (Sousa et al. 2016).

Tabu search (TS)
F. Glover first presented TS as a prescriptive meta-approach for tackling optimization problems in 1986. The method is built on active exploration and adaptive memory concepts, which allow for a cost-effective and efficient search of the solution space until no improvement is found (Abdmouleh et al. 2017).
TS was a key player in resolving the challenge of identifying and sizing DGs. Golshan et al., for example, concentrated on the optimum planning of DG with the goal of minimizing each of line loading limits and power losses in Golshan et al. (2007) and Golshan et al. (2006). On the other hand, TS have the drawback of requiring significant number of parameters and repetitions to be established. TS's primary benefits and drawbacks are mentioned in Table 5.

Ant colony optimization (ACO)
In 1996 the first ACO algorithms is presented by Dorigo, which were based on the insect's social conduct in seeking the nearest pathways to their meals. Researchers found pheromone traces left by ants on a physical level. Other aunts utilize this chemical to provide information about their paths. The ACO procedure begins randomly with a population of solutions that assimilate to ant hunts and the traces left by their movement. As a result, the shorter the path, the more trails there are. The following searches will take this information into account (Abdmouleh et al. 2017).
ACO is presented in Falaghi and Haghifam (2007) and Wang et al. (2008) to tackle the challenge of locating and sizing DGs for reducing overall power loss. The dependability index was utilized as the objective function in Wang et al. (2008), and the ACO method was used to tackle discrete optimization issues. In comparison to GA, the findings indicated that ACO provided greater solution quality and took less time to compute. However, because the solution space to be assessed is bigger, ACO takes longer to converge, although it is still faster than analytical techniques. Table 5 lists more details about the advantages and disadvantages of ACO method. Table 5 summarizes the key benefits and drawbacks of the TS approach.

Harmony search (HS)
The HS approach was initially suggested in 2001. It is affected by players' methods for increasing the tune of their machines. Unlike other current techniques that are depend on observed nature occurrences (Stroe et al. 2018).
In Piarehzadeh et al. (2012) and Rao et al. (2012), HS was used in conjunction with a loss sensitivity factor technique to determine the best DG placement. In Piarehzadeh et al. (2012), it was determined that using the HS algorithm rather than the PSO method for DG allocation improved voltage stability.
The harmony algorithm was suggested to discover the best scheduling ESS at time-ofuse charges with no demand for production of renewable energy amenities as solar and wind power. The research focuses on the scheduling of ESS for retail clients of Photovoltaic generating installations with the same energy price scheme (Geem et al. 2017). Table 5 presents the HS technique's benefits and drawbacks.

Artificial bee colony (ABC)
Karaboga presented the ABC method as an optimization strategy in 2005 to mimic honey bee foraging behavior and has been efficiently applied to a wide range of problems.
To decrease power losses, network demand reduction, line overloading, and overall voltage profile enhancement, Choton (2007) suggested an ABC-based strategy for finding the best location of storage devices distributed in electricity grids (Das et al. 2018). The ABC technique had faster convergence and executed better when the outputs of ABC were compared to those of the PSO. The ABC method was presented in Abu- Mouti et al. (2011) for optimal DG size, placement, and power factor to reduce overall loss in electric power. When compared to the PSO technique, it was discovered that ABC converged quickly with a superior solution. In comparison to the revised PSO method, the results produced with the artificial bee colony algorithm with dual aims (raising voltage stability index while lowering power loss and emissions) are of adequate consistency and variety (Abdalla et al. 2021b).

Biogeography based optimization (BBO)
BBO was first presented in 2008 by Dan Simon, which is depends on biogeographic mathematical models (uses a stochastically iterative function to optimize a function). It includes a variety of behaviors that are similar to those of fish, birds, and insects. It describes their evolution, migration, and extinction (Abdmouleh et al. 2017).
Duong For the size of PV DG with inside the radial power distribution network, it provides a good arrangement mainly based on BBO, reducing energy loss and maintaining normal voltage while keeping the effects of harmonic distortion from exceeding the limit (Duong et al. 2019). The outcomes confirmed that the novel strategy converges more rapidly and consumes less time than the GA, PSO, and ABC.

Hybrid heuristic methods
A hybrid technique involves more than one technique to make use of the benefits of each method while addressing the drawbacks of one approach (Eriksson and Gray 2017). Many hybrid methods for optimizing hybrid systems have been developed in recent years, such as simulated Annealing and Chaotic Search (SA-CS) (EL-Sayed et al. 2017), chaotic search-harmony search-simulated annealing (CSHSSA), improved harmony search-based chaotic simulated annealing (IHSCSA) , and harmony search-based simulated annealing (HSSA) (Zhang et al. 2018b). There are also hybrid methods that combine Monte Carlo simulation and multi-energy-balance/financial equations (Gu et al. 2018), genetic algorithm and particle swarm optimization (GAPSO) (Ghorbani et al. 2018b), multi-objective crow search algorithm (MOCSA) (Jamshidi et al. 2019), Group Method of Data Handling neural network and modified fruit fly optimization algorithm (GMDHMFOA) (Heydari et al. 2019).
Several hybrid techniques have been proposed in the literature to handle the problem of DG placement and size optimization. It was feasible to raise the current novel hybrid methods and combinations through this survey. Furthermore, the survey reveals that GA has a substantial variety of studies that have combined GA with different often used methods as PSO to deal with the problem of DGs locating and sizing. for example in Sandeep et al. (2020), GA and the Decision Making with Multi-Attribute (MADM) method are combined, which took into account several power system characteristics. Other improved GA techniques include GA with Adaptive parameters (AGA), which has been shown in Kanase-Patil et al. (2011) for a higher degree of resilience and have a higher level of search capability, similar to the Quantitative Genetic Algorithm (QGA) (Khosravi et al. 2020). To improve a hybrid system of solar energy and concentrate solar PV with batteries, the combined GA-PSO method is used in Liu et al. (2019). The outcomes demonstrated considerable gains in both economic and technical aspects in contrast to alternative approaches and systems.
To tackle the difficulties of REG, a robust multi-target optimization (Hybrid PSO and Teaching Learning) based on a minimal optimization method is proposed. When addressing WT instability, numerical outputs show that the multi-objective distribution model meets the criteria of solving. Meanwhile, similar outcomes imply that the PSO-TLBO approach is effective in addressing the indicated shipping issues (Cheng, et al. 2018). Zhou et al. (2008) presented ANN/GA approach for determining the optimal spectrum for solar size and power of battery to meet the load demand. The energy storage device's average capital cost must be kept to a low, and the system's stability (typically measured in load failure probability) must be adequate.
ANN may be applied to optimization in a variety of ways. Amirtharaj et al. suggested a combination of ANN and grasshopper optimization algorithm with adaptive function (AGOA) dubbed AGONN approach (Amirtharaj et al. 2019) to discover the optimal way for minimizing the system switching loss. In comparison to GOA, combined ANN with the Bat Search approach after modification CMBSNN, and the combination of ANN with whale optimization technique (WOANN), the results demonstrate that the proposed technique outperforms them in terms of current, voltage, and power signal.
In terms of ESS control, the ANN is trained with a set of data produced during the two controllers' optimization stage by the Differential Evolution Optimization (DEO) with low and high disturbance (Zhou et al. 2008) to modify the controller settings live. The efficacy of this suggested controller is demonstrated using an electricity grid that includes an alternator, solar power, and a battery ESS. ANN and Dynamic programming are used to regulate the energy flow of ESS by reducing energy losses and enhancing the life time battery and by decreasing battery's volume and fluctuations (Shen et al. 2015). The optimal frequency is used to define the inertia wind storage. Matching the frequency as an input and the state as an output of an energy storage device (Wu et al. 2018) is suggested by the Polyline Fuzzy Neural Network (PFNN) method.
The battery SOC is controlled using ANN within the operating range of the integrated PV/wind system. Furthermore, FBC maintains a constant battery current and DC voltage (Song et al. 2013). Wind production should fluctuate in response to load demand, according to the FLC/GA approach. The configuration of FLC/GA reduces voltage fluctuation by 43.46%. The ANFIS system is designed to ensure system efficiency while regulating hybrid wind and solar energy storage for hydrogen and battery storage while maintaining efficiency of system. The battery efficiency and hybrid battery/hydrogen systems improved by 0.6% and 0.4%, respectively (García and Aguilar 2013). The FLC/PSO algorithm considers the operating cost and battery SOC while controlling wind energy with hydrogen and battery storage. Both the weekly operating cost was reduced by 18.7%, and the weekly SOC of the battery was enhanced by 16.9% by using the suggested system (Athari and Ardehali 2016).

AI approaches in demand response
Recently, the interest and focus on developing demand response (DR) programs in order to increase system flexibility and reliability in an efficient manner have increased. Reliance on Artificial intelligence has become very necessary in order to achieve the lowest cost and ensure consumer comfort. AI approaches can be applied to address different challenges in DR. The different AI techniques used in DR is shown in Fig. 7 (Antonopoulos et al. 2020). Smart grids have the potential to engage consumers in energy saving programs through the use of artificial intelligence. This is useful in reducing peak loads and responding to the demand for load. The network performance at peak demand time can be improved through the use of DR programs, which express the mechanism by which consumers are encouraged to reduce the peak. There are many types of DR program, including Price-based and Incentive-based DR. Price-based DR programs, based on changes in the price of electricity over different time periods, aim to motivate end consumers to change their consumption patterns. This type includes time of use (ToU), critical peak price (CPP), and real-time price (RTP) (Failed 2018c). On the other hand, Incentive-based DR programs depend on motivating end-users to reduce their electricity consumption through offers or through contractual agreements, so this type can be called Contract-based. In this type, consumers voluntarily join in certain rewarding schemes, and the electric power operators have the ability to control some consumer devices to reduce the loads at peak times (Chai et al. 2019). In order to rely on DR programs in an effective and beneficial way, a number of issues must be taken into account, such as forecasting the price of electricity and consumption in addition to selecting suitable consumers. Also, the real time pricing can lead to many fluctuations in the cost of electricity. This could affect low-income clients. In addition, smart meters should be used to exchange hourly prices and other data to support DR programs.

Artificial intelligence based forecast techniques
Artificial intelligence is widely used in forecasting. This includes forecasting the loads and their types in addition to forecasting the price. Forecasting important parameters in the electrical network, such as price and load, is one of the most important factors that help in the optimal operation of the electrical grid. This helps electricity producers achieve success in the electricity market. In addition to that, operators need accurate price and load information to increase grid reliability. Achieving an effective DR depends on the ability to accurately and decisively predict the load, energy production and prices. Forecasting consumption helps in long-term planning, which helps to make the electrical grid more reliable. In addition, long-term forecasting helps clients better understand available resilience which in turn helps in setting DR signals (compensation/ prices) Lindberg et al. 2019). Short-term forecasting helps in reducing peak time by scheduling loads in real-time (Aly 2020;Heydari et al. 2020). The ANN has attracted a lot of interest as a result of its good results in forecasting load and price (Velasco et al. 2022;Wu et al. 2021;Singhal and Swarup 2011). An intelligent hybrid three-stage model was implemented to forecast both the load and price. This model relies on the use of wavelet and Kalman machines for the first stage of forecasting, while in the second stage it relies on Multi-Layer Perceptron ANN to forecast the load, while ANFIS is used to forecast the price. In the third stage, the output of the previous stage is used and fed to the Multi-Layer Perceptron ANN and ANFIS to improve forecasting accuracy (Nazar et al. 2018). Load forecasting plays an influential role in the process of harmonizing between demand and production. This depends on the accuracy and quality of the load forecasting process. A short-term load forecasting study was conducted using multiple techniques to improve overall system quality. Kalman filtering (KF), Wavelet Neural Network (WNN) and ANN schemes were used in this study. The hybrid models such as WNN and KF, ANN and WNN, ANN and KF, are used to reduce the error since using either KF, WNN, or ANN alone makes the error rate high. These models were validated using different data for two sites located in Egypt and Canada (Aly 2020). Some of the most common NN topologies used in predictive power system maintenance include ANNs (feed-forward NNs), CNNs (convolutional neural networks), and RNNs (recurrent neural networks). Sunil et al., for example, (Failed 2019b) use 5-layered FFNN for detecting faults in PV systems, with the model Practiced using 9 characteristics including various current and voltage data. In the solar steam plant, ANN has been utilized to forecast intercept factor and radiation profile on parabolic trough collectors (Kalogirou 2000). An FFNN model is presented for forecasting faults of WT sensor is proposed by Gokcen and Burak (Kavaz and Barutcu 2018). There are a few additional noteworthy efforts that use FFNNs to detect faults in RE systems (Eroğlu et al. 2019;Martinez et al. 2018;Jiang et al. 2017). The works provided in Abdali et al.

Case study
AI means more clearly the use of a machine to perform calculations that mimic human thought. This machine analyzes the input values and accordingly generates the output. AI gives the electric grid more reliability, intelligence and improved responsiveness. It is used for many purposes in microgrids such as integrating renewable energy sources, energy management and forecasting. Table 6 shows the AI techniques applied in the microgrids.
This section describes a case study illustrating the use of AI to improve the performance of integrated RESs. This case study is conducted on an isolated microgrid consisting of wind, wave, and solar . The three sources were integrated together using Buck-Boost technology. This microgrid has been implemented experimentally and using simulation in MATLAB/Simulink environment. In this case study, artificial intelligence is applied to this microgrid to study its impact on the performance of the microgrid. The integration of RESs is accompanied by many obstacles to get rid of these obstacles hybrid model that combines the ANN with GA, PSO, MVO, or ALO is used as this helps in improving its operational accuracy to provide an effective and accurate prediction control scenario for the integrated system.

System description
This case study focuses on studying the dynamic modeling and control of an integrated system that combines wind, wave, and solar energy sources. To increase the reliability of the used system to integrate the sources, three sources with different natures were used as each of them depends on different factors in the production of energy. These sources were integrated on the DC bus using Buck-Boost converter technology. This was implemented experimentally and using simulation. The Buck-boost converter is used to unify the output voltage in order to facilitate the process of feeding the load or charging the batteries. The results obtained from the previous study are compared with the results obtained after using artificial intelligence. The artificial intelligence technique used in this study helps to increase the reliability of the proposed hybrid system. This is done through continuous monitoring of the entire system and prediction of the consumption in addition to the produced energy in order to improve the integration process. Various optimization algorithms are combined with ANN to enhance the operational accuracy of the buck-boost converter in order to assure the effectiveness and accuracy of forecasting.

Case study results
Artificial intelligence is used to control the output of the three sources by predicting sequential steps to increase the accuracy of the output of the controller. The results obtained from the previous research are compared with the results obtained from ANN alone or using a hybrid model that combines the ANN with GA, PSO, MVO, or ALO. The results of these models are compared to get the best model. The operating parameters of ANN, PSO, MVO, ALO and GA are shown in Table 7. Table 8 shows a comparison between the different models used in terms of NMSE and Computational time. It is clear from Table 8 that the NMSE percentage is very high when using ANN only without any optimization algorithms, reaching about 22.47%. It is considered the highest compared to other models. On the other hand, the lowest error rate occurs when using PSO with ANN, reaching about 1.10%. The percentage of NMSE reached about 3.19% when using ANN with GA, while when using MVO and ALO it reached about 1.25% and 5.11%, respectively. The lowest model in the computational time is when using ANN alone reaches about 7.20 s, followed by when using the hybrid system that combines GA with PSO reaches about 3367.50 s, while when using ALO, the computational time reaches the highest value about 4527.69 s. The results obtained from the different models can be summarized in the following points: 1. The ANN has the ability to quickly work with multidimensional systems but it suffers from misidentification of the global optimum and stagnation in local minimum. 2. A hybrid technique involves ANN with GA, PSO, ALO or MVO to make use of the benefits of ANN while addressing the drawbacks of it. 3. Training the ANN With ALO algorithm leads to minimizing the NRMS error but still ANN suffers from stagnation in local minimum moreover a large computational time is needed 4. Using GA with the ANN converged from iteration 650 to the best minimum with error reached to 3% with least computational time. 5. Both PSO with the least computational time and MVO converged quickly to the global minimum when compared to GA, it has fast convergence rate for reaching to the minimum errors between actual and forecasted voltage.

Discussion
As a result of the active development of clean energy and the reliance on it on a large scale compared to the past, the pollution problems that occur from traditional sources have been significantly suppressed. Despite this development, there are some obstacles facing this spread, which are related to the reliability and stability of the electrical network. Therefore, Researchers resorted to integrating many RESs together to increase the stability of the electrical network and provide energy that covers demand, and this is considered the first stage. In the second stage, there is a tendency to develop the integration process through the use of artificial intelligence. Using AI can provide effective solutions to these obstacles, and improve the lifespan of the electrical network. Currently, the investigation on the optimization and integration of RESs are not precise and deep sufficient, the related theories are not developed sufficiently, and there are still numerous issues to be illuminated directly.
In the previous sections, detailed reviews were conducted on the potential challenges arising from integrating renewable sources with the grid, the control strategies used as well as the artificial intelligence techniques used in the process of integrating and responding to energy demand, and the main application areas of interest in this field. It comprehensively covers the possible obstacles of the integration as well as the control mechanisms that have been implemented. The following points are concluded from the review: 1-Establishment, operation and integration schemes for various RESs, in addition to the integration requirements and the challenges of microgrid communication. 2-A comprehensive review of the various hybrid power systems is conducted in order to determine the best and most reliable systems. The various control systems used for the effective operation of electrical power systems are presented, which include centralized, decentralized and distributed control. 3-The paper reviews the means of communication in the microgrid, with the identification of challenges and obstacles that they face and their impact on the network. Strong and reliable communications facilitate greater control between embedded systems and broader energy management so, many advanced communication systems have been adopted in modern networks, such as optical fibers. 4-A number of traditional methods and artificial intelligence techniques are reviewed in this paper used to integrate and control different RESs. Based on this review, it is clear that AI techniques have been applied in a wide range of fields for modeling, prediction, simulation, optimization and control of renewable energy systems. AI techniques are used to solve complex practical issues in different areas. They provide an alternative approach in terms of reducing cost and increasing the accuracy, efficiency and reliability of electrical systems. 5-A case study was conducted discussing the use of artificial intelligence to increase the reliability of integrated systems. A hybrid optimization model that combines ANN and GA, PSO, MVO or ALO was used in order to improve its operational accuracy to provide an efficient and accurate prediction control scenario for the integrated system. ANN-PSO has the least computational time reached about 3367.50 s with least NMSE percentage about 1.10%.

Conclusions
The integration of RESs with the grid is one of the main problems facing smart grids due to the variability in the nature of sources and the inability to accurately predict the energy produced from each source. Several observations can be drawn from the conducted review. This paper reviewed the integration schemes for different RESs, integration requirements, and microgrid communication challenges. Furthermore, it discussed the use of artificial intelligence to reduce the overall cost of integrating RESs. A comprehensive comparison was made comparing the different optimization techniques used. In particular, to find the most efficient methods for effective control of microgrids. The integration of RESs with the main grid is the first step towards moving from the traditional system to the smart grid system. The research also targets the challenges and techniques used in the integration of RESs with the grid and their impact on the main grid. literature that discusses methods of integrating different RESs, improving energy quality, reducing costs and emissions, real-time pricing, load forecasting, and sizing of combined sources, are reviewed. This leads to a safer future from an environmental point of view and a complete improvement of the electrical grid.
A set of studies has been presented for various possible combinations of RESs, which in turn paves the way for choosing the appropriate combination for the reliability of performance. Emphasis has been placed on the different control approaches for the efficient operation of microgrid systems, which include centralized, decentralized, and distributed control. The novelty in this paper lies in the classification and the amount of information provided, which will help future developers to find solutions to the problems that accompany the integration process.
This paper also reviews the applications of artificial intelligence techniques in electrical networks, including prediction, effective grid control, and energy management. It investigates the value-creating potential of AI technologies to support the integration of different RESs by enhancing their viability in the economic and commercial sectors. The literature review conducted in this paper shows that the use of AI is appropriate for problems associated with renewable energy systems, which are characterized by high uncertainty and big data. Unlike traditional methods, AI techniques achieve significant improvement in the performance of the electrical network. In addition, a review has been made of artificial intelligence techniques that are applied in energy demand response systems and their impact on electrical grid systems in terms of cost and reliability.   To ensure the effectiveness of artificial intelligence systems and their ability to improve the quality and reliability of the electrical network, artificial intelligence was applied to a previously designed model. This model integrates three RESs, wave, wind and solar, through buck-boost converter technology. More than one hybrid optimization model has been applied to determine the most accurate and capable of them to reach the lowest NMSE percentage in the least time. ANN with PSO achieved the best performance among other hybrid models, as it reached the lowest NMSE percentage about 1.1% in the lowest computational time about 3367.50 s.
Funding Open access funding provided by The Science, Technology & Innovation Funding Authority (STDF) in cooperation with The Egyptian Knowledge Bank (EKB).
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.

References
Abdali A, Mazlumi K, Noroozian R (2017) Fast fault detection and isolation in low-voltage DC microgrids using fuzzy inference system. In: 2017 5th Iranian joint congress on fuzzy and intelligent systems (CFIS), IEEE, pp 172-177