###### Abstract  
Cost management of microgrids represents a real challenge since the power generation of microgrids is usually composed of different renewable and non-renewable sources. Additionally, it is always desired to make a connection between the microgrid and national grid to secure the load demand and to fit the regulations of liberated energy markets. Because of all these reasons, it is essential to develop a smart energy management unit to control different energy resources within the microgrid to achieve minimum operation costs. This paper presents a proposal for a smart unit for the cost management and operation of multi-source based microgrids. The proposed unit utilizes the Harris hawk optimization (HHO) algorithm which is used to optimize the cost of operation based on current load demand, energy prices and generation capacities. The proposed unit is tested on a microgrid with different energy resources using MATLAB while applying different operation scenarios. All simulation results show that the proposed unit succeeds in operating the microgrid at minimum cost. Obtained results are compared with other optimization algorithms and the proposed Harris hawk algorithm gives superior performance. energy management; microgrids; optimization; metaheuristic +
Footnote †: journal: Applied Sciences  
1  
[PERSON] and [PERSON]  
1 Department of Electrical Energy Engineering, Arab Academy for Science, Technology and Maritime Transport, Cairo 12577, Egypt; [EMAIL_ADDRESS]  
[PERSON]  
1 Department of Electrical Energy Engineering, Arab Academy for Science, Technology and Maritime Transport, Cairo 12577, Egypt; [EMAIL_ADDRESS]  
[PERSON]  
1 Department of Electrical Energy Engineering, Arab Academy for Science, Technology and Maritime Transport, Cairo 12577, Egypt; [EMAIL_ADDRESS]  
[PERSON]  
1 Department of Electrical Energy Engineering, Arab Academy for Science, Technology and Maritime Transport, Cairo 12577, Egypt; [EMAIL_ADDRESS]  
[PERSON]  
2 Department of Basic and Applied Sciences, Arab Academy for Science, Technology and Maritime Transport, Alexandria 21913, Egypt; [EMAIL_ADDRESS]  
[PERSON]  
2 Department of Basic and Applied Sciences, Arab Academy for Science, Technology and Maritime Transport, Alexandria 21913, Egypt; aaelbary@aast. The main role of the EMS is to decide the amount of energy that needs to be supplied by the DERs within the microgrid and to organize the power exchange between the unified grid and the microgrids. The decisions of the EMS are based on the ability of DERs and the current prices of energy. This means that the EMS must take accurate decisions to balance between increasing local production and maximizing economic revenue. Consequently, energy management of microgrids forms a highly constrained optimization problem and this optimization problem is usually considered an offline one [8]. From the above-mentioned explanation, it is clear that the EMS's objective function depends on providing various types of data. Some of these data can be easily determined, such as the generation capacities of the grid and microturbines. However, most of them depend on forecasts and estimations such as loading limits, wind speed, solar irradiance, energy prices, etc. As a result, the researchers have followed two techniques in optimizing the EMS's objective function [9; 10]. The first is the deterministic approach: in this approach, all forecasted data are taken into consideration as they are assuming that they have very high accuracy. The other approach is the probabilistic approach in which all forecasted data are put in the form of variables. Each variable has a probability that resembles the accuracy of the forecast. Researchers have applied many optimization algorithms to solve the EMS problem. One of the famous techniques is linear programming (LP) which considers the power balance and generation limits of the distributed generation units. However, this method suffers from one main disadvantage, which is a high computational burden [11; 12; 13].