In this paper, two recent heuristic optimization algorithms are presented to optimally manage the operation of the micro-grid (MG) with installed renewable energy sources (RESs); krill herd (KH) optimization and ant lion optimizer (ALO) algorithms. The first algorithm is used for solving single-objective function represents either total operation cost or total pollutant emission injected from the installed generating units while ALO is applied to solve the multi-objective function of both total operating cost and emission. The problem is formulated as nonlinear constrained objective function with equality and inequality constraints. In this work; the devices installed in MGs are photovoltaic panel (PV), wind turbine (WT), micro-turbine (MT), fuel cell (FC), battery and grid. Two scenarios are studied; the first one is optimizing MG with installing all RESs within specified limits in addition to grid, while the second scenario is operating both PV and WT at their rated powers. The obtained results are compared with different reported algorithms like genetic algorithm (GA), Fuzzy self-adaptive PSO (FSAPSO) and others programmed like particle swarm optimization (PSO), grey-wolf optimizer (GWO) and whale optimization algorithm (WOA). For first scenario; the proposed KH gives the best optimal cost of 105.94 €ct while the best emission is 420.57 kg, the best optimal cost and emission of 592.86 €ct 339.71 kg are obtained via KH in the second scenario.
One of the most important problems facing the society is the environmental pollution resulted from the operation of the power plants. In recent times; clean sources are able to generate electric energy without causing any pollution named renewable energy sources (RESs) such as solar and wind energies. Therefore; micro-grids (MGs) with installed RESs have been introduced as alternatives to the utility grid especially in the remote areas. The most important challenge facing micro-grids operation is the sizing process of these RESs. Literature works dealt with the process of management and operation of MGs as an optimization problem for achieving less operating cost and less pollutant emission of the installed RESs.
Guo et al. [ 1 ] determined the optimal sites and sizes of RESs installed in typical micro-grid via formulating multi-objective function comprising the contract price between distribution company (Disco) and distributed generation owner (DGO). Non-dominated sorting genetic algorithm (NSGA-II) has been used for solving the presented problem. A micro-grid including RESs, plug-in hybrid electric vehicles (PHEVs) and storage device has been optimized in Ref. [ 2 ] via Mont-Carlo approach. Alavi et al. [ 3 ] performed energy management process for typical MG based on relevant uncertainties modeled by point estimate method. A hybrid optimization algorithm comprises Fuzzy rules and particle swarm optimization (PSO) has been presented by Moghaddam et al. [ 4 ] to manage MG optimally. In Ref. [ 5 ], the optimal operation of typical MG with RESs has been solved via adaptive modified particle swarm optimization (AMPSO). Gabbar et al. [ 6 ] determined the optimal output power of distributed energy resources installed in MGs via multi-objective GA. Borhanazad et al. [ 7 ] presented multi-objective PSO for determining the optimal siting and sizing of RESs installed in MG, the objective function comprises electricity cost and loss of power supply probability (LPSP). Differential evolution (DE) approach has been presented in Ref. [ 8 ] to evaluate the optimal site, generation level, tariff incentives for RESs such that Disco’s profit has been maximized. Multi-objective optimal planning process has been introduced in Refs. [ 9 , 10 – 11 ] to achieve both Disco and DGO benefits. Moradi et al. [ 12 ] treated with optimization of MG as slave-objective and multi-objective problems. Artificial bee colony and its modification via gravity search algorithm have been presented in [ 13 , 14 ] for optimal management and operation of micro-gird. The total operating cost including emission price and start-up cost has been taken in Ref. [ 15 ] as objective function for evaluating the optimum operation of MG; the problem has been solved via mesh adaptive direct search algorithm (MADSA). Stochastic model of coordinating the generating units installed in MG has been introduced in Refs. [ 16 , 17 – 18 ]. Bahramara, et al. [ 19 ] presented bi-level optimization approach for achieving the objectives of Disco and MGs. Multi-objective function represents the operating cost and emission extracted from the distributed generators (DGs) installed in MG has been optimized via heuristic algorithm [ 20 , 21 , 23 ]. In Ref. [ 22 ], wind farm and pumped storage unit installed in MG have been optimized for achieving less cost.
Other researchers dealt with the optimal sizing of RESs in stand-alone power system. Ahmadi et al. [ 24 ] proposed a hybrid big bang–big crunch for (HBB-BC) for solving the optimal size of photovoltaic (PV) system, wind turbine and battery bank for minimizing the total cost. In Ref. [ 25 ], the proposed RESs, PV, diesel and battery, are sized optimally via quadratic programming approach. Kaabeche et al. [ 26 ] presented an iterative optimization approach for optimal sizing of RESs such that achieving minimum energy load deficit. In Refs. [ 27 , 28 ], single and multi-objective optimization problem have been presented to solve the sizing of hybrid system of PV-wind-diesel-battery system for minimizing the net present cost (NPC) of the system. Single and multi-objective problems have been studied in Ref. [ 29 ] for optimal sizing of RESs for minimizing the system cost and weight. In [ 30 ], adaptive neuro-Fuzzy inference system (ANFIS) has been introduced for optimizing hybrid RESs and calculating the optimum tilt angle for the PV system. A hybrid grid connected RESs system is optimized in Ref. [ 31 ]. Fathy [ 32 ] used mine blast algorithm (MBA) for evaluating the optimum size of PV, wind and fuel cell to cover a load in remote area with minimum operating cost. Most of the optimization approaches used in previous work are complex in construction, large consuming time and may fall in local optima. Therefore, two recent optimization approaches are used to eliminate these defects in the reported work either for single-objective or multi-objective optimization problem.
This paper aims to optimize the operation of MG including RESs via two recent optimization algorithms; the first is krill herd (KH) optimization and the second is ant lion optimizer (ALO). Two scenarios are studied; the first one is optimizing MG with installing all RESs with their specified limits in addition to grid, while the second scenario is operating both PV and WT at their maximum powers. The presented objective function is multi-objective of total operation cost and pollutant emission generated from the installed distributed generators (DGs). The obtained results encourage the usage of both presented algorithms in solving the problem under study due to their efficient and reliable performances.
The main objective of this work is proposing an optimized strategy for energy management in typical micro-grid including renewable energy sources (solar and wind), conventional distributed generators (micro-turbine and fuel cell), storage device (battery) and grid, the complete system is shown in Fig.
1
. In typical micro-grid; the DGs are installed in MG with the help of local controllers and MG central controller (MGCC). Inside MGCC there is a central control point which is responsible for optimization of the smart operation of MG. The load power and generated power extracted from the DGs are fed to this central control unit and the output is the optimal set on/off for the installed devices.
Structure of typical micro-gridFig. 1

The planning process of MG operation aims to control the economic dispatch (ED) of load on the existence of DGs, in this process; two important issues should be taken into account which are the total operation cost and the pollutant emission injected from the installed conventional DGs. Minimization of the cost/emission is essential to get perfect operation of MG; therefore, multi-objective function including cost and emission is presented and detailed in the following section.
The total operating cost of the DGs installed in MG includes the cost of fuel and the cost of start-up/shut-down. The first objective function can be expressed as follows:
The pollutant emission injected from MG is generated due to the generating units, the grid and energy reserving resources [
20
]. It is considered that the emission includes carbon dioxide (CO
2
), sulfur dioxide (SO
2
) and nitrogen dioxide (NO
x
), the mathematical formula of the emission can be written as:
The presented constraints in this work are three categories; load balance, limits on the power generated of each unit and constraint belongs to the charging and discharging of the storage device.
The sum of the power generated from DGs, storage device and grid must be sufficient to cover the load at any time.
This constraint is concerned with increasing or decreasing of the DGs output power, the constraint can be described as follows:
The power generated from each element must not violate out of its limit as follows:
The constraints regulating the charging and discharging processes of the storage device can be written as:
In this work two heuristic approaches are used, krill herd and ant lion optimization, the first is chosen due to its superiority than other swarm intelligence algorithms with ensuring global optimum solution. The selection of ant lion optimizer is due to its ability in searching the optimum solution with high convergence and coverage, additionally it requires less controlling parameters. The detailed description of each approach is given in the following section.
Gandomi and Alavi [
33
] hired the herding behavior of the krill individuals in presenting recent optimization algorithm named krill herd (KH). In KH; two items control the movement of the krill, the minimum distances of each one from the food and from highest density of the herd. The position of the krill at defined time is formulated by three categories; motion induced, foraging motion, and physical diffusion. The first one is formulated due to krill’s motion induced from other one, however; the second category is determined according to the food location and the previous experience. Before food attraction process; the center of food should be estimated according to the fitness distribution of the krill individuals which is motivated from the center of mass. Based on these basic concepts of the krill nature; the dynamic of the krill can be described as follows:
Flowchart of optimization algorithms (
a
) krill herd, (
b
) ant lionFig. 2

Mirjalili exploited the nature of the ant lions’ hunting behaviors in catching the prey and presented optimization algorithm named ant lion optimizer (ALO) [
34
]. The ant lion drills cone-shaped hole in the sand used as trap; it hides underneath the cone bottom and waits the insects to be trapped. The ALO simulates the interaction between the ants (preys) and ant lions (hunters), as the ants move around the search space in random walk while the ant lions maintain the best position of the ants and guide them to fall in their pits. The main steps of ALO are the random walk of ants, entrapment in the pit, constructing a pit, sliding ant toward the ant lions, catching prey and reconstructing the trap and elitism. The random walk of ants is expressed as:
Finally; the ant lion that has impact on all ants is saved and considered as elite in process called elitism. All ants are randomly walked around the fittest ant lion by roulette wheel as:
The main contribution of this paper is presenting a new methodology based on two recent optimization algorithms; krill herd (KH) and ant lion optimizer (ALO) algorithms, for solving the optimal management of micro-grid such that minimizing the operation cost and pollutant emission. The selection of both algorithms is due to their simplicities in construction, requirements of less controlling parameters therefore, avoiding local optima. The KH is used for solving single-objective optimization problem while ALO is used to solve multi-objective one. ALO is selected for solving the multi-objective problem due to high convergence and coverage in obtaining Pareto optimal solution [ 35 ].
The MG under study comprises grid distributor and DGs like photovoltaic panel (PV), wind turbine (WT), micro-turbine (MT), fuel cell (FC) and battery. The maximum allowable daily power extracted from the PV and WT are shown in Fig.
3
. The analysis is performed on daily load shown in Fig.
4
; the energy market price (grid bid) is given in Fig.
5
. The bids, start-up/shut-down cost, emission, maximum and minimum power of the installed DGs and grid are tabulated in Table
1
.
Maximum allowable PV and WT powers during a day Daily load power in the typical micro-grid Energy market price Installed DG bids and emissions data Generating unit Bid (€ct/kWh) Start-up/shut-down (€ct) CO2 (kg/MWh) SO2 (kg/MWh) NOx (kg/MWh) Minimum power (kW) Maximum power (kW) PV 2.584 0 0 0 0 0 25 WT 1.073 0 0 0 0 0 15 MT 0.457 0.96 720 0.0036 0.1 6 30 FC 0.294 1.65 460 0.003 0.0075 3 30 Battery 0.38 0 10 0.0002 0.001 − 30 30 Grid Figure 0 0 0 0 − 30 30Fig. 3

Fig. 4

Fig. 5

Table 1
The first case studied in this paper is operating all DGs and grid within specified limits given in Table
1
; this means that MG with configuration given in Fig.
1
is established. First; the krill herd optimization is applied for 50 trials to minimize the total operating cost. The controlling parameters of KH are selected as
V
f
= 0.02,
D
max
= 0.005,
N
max
= 0.01, population size = 50 and maximum iteration = 1000. The analysis is performed on IntelHAS, Core i3 CPU M370 at 2.40 GHz, 4 G RAM laptop. The hourly generated power from each component is given in Table
2
. As shown, in the early hours of the day the bulk of the load is supplied via the MT, FC with the help of grid with the absence of PV and WT due to their large bids while during the mid of day, the PV and WT share the growth of the load. In the last hours of the day, the dependency on fuel cell, battery and grid is placed again to meet the load power. The optimum operating cost is 105.9385 €ct, comparative study including statistical parameters (best, worst, mean and standard deviation) with previous methods and other programmed like GWO, PSO and WOA is performed and tabulated in Table
3
. The controlling parameters of the programmed approaches are shown in Table
9
given in appendix. It is clear that the best statistical parameters are obtained via the presented KH algorithm; additionally the computational time of the proposed KH is 104.169599 s which is less than other approaches. The response of the proposed KH compared with the other programmed algorithms (GWO, PSO and WOA) is given in Fig.
6
a. On the other hand; the emission dispatch is performed by KH algorithm and comparative statistical parameters are given in Table
4
, the minimum emission obtained via KH is 420.57 kg obtained after 79.42 s which is considered as the best one. Figure
6
b shows the performance of KH algorithm compared with the others.
Optimal output powers from DGs with minimizing operating cost (first scenario) Hour 1 52 0 0.01 12.96 25.24 − 4.94 18.73 2 50 0 0.005 17.18 21.72 11.44 − 0.36 3 50 0 0.002 10.00 25.36 0.624 14.01 4 51 0 0.005 8.03 19.88 − 0.52 23.60 5 56 0 0.001 19.08 21.15 6.34 9.43 6 63 0 0.001 11.99 28.69 3.27 19.04 7 70 0 0.02 23.24 29.04 7.85 9.84 8 75 0.0003 0.004 18.99 25.74 12.27 17.99 9 76 0.007 1.12 21.23 29.99 15.77 7.88 10 80 7.52 3.09 29.99 30.00 29.99 − 20.61 11 78 9.23 8.77 30.00 30.00 30.00 − 30.00 12 74 3.59 10.41 30.00 29.99 30.00 − 30.00 13 72 0.0004 0.93 29.98 27.43 24.10 − 10.45 14 72 9.63 2.37 29.99 30.00 30.00 − 29.99 15 76 0.0001 1.78 30.00 29.99 29.99 − 15.79 16 80 0.0005 0.67 27.37 29.78 29.03 − 6.85 17 85 2.2e–05 0.005 19.93 29.70 20.03 15.33 18 88 0 0.01 21.27 29.48 12.99 24.25 19 90 0 0.01 20.89 24.69 22.47 21.93 20 87 0 0.001 24.12 29.62 6.063 27.19 21 78 0 0.03 22.97 29.99 23.23 1.78 22 71 0 0.005 22.01 28.51 25.06 − 4.58 23 52 0 0.017 17.54 22.24 8.17 17.03 24 50 0 0.008 21.87 20.10 4.97 9.05 Statistical comparative results with other algorithms for minimizing operating cost (first scenario) Algorithm Average (€ct) Standard deviation (€ct) Worst (€ct) Best (€ct) Computational time (s) FSAPSO [ 125.91 0.006 125.92 125.91 NA GA 151.89 36.23 210.46 125.91 114.67 GWO 151.57 40.20 824.30 128.93 132.17 PSO 145.28 53.52 830.83 126.16 556.64 WOA 129.05 8.99 307.55 126.09 149.17 KH 148.57 0.009 1337.7 105.94 104.17 Performance of KH compared with others (
a
) economic dispatch, (
b
) emission dispatch Statistical comparative results with other algorithms for minimizing emission (first scenario) Algorithm Average (Kg) Standard deviation (Kg) Worst (Kg) Best (Kg) Computational time (s) FSAPSO 422.02 0.005 422.03 422.02 NA GA 506.78 89.25 680.33 422.02 119.85 GWO 580.88 300.97 2699.2 451.54 167.44 PSO 500.44 216.42 2943.4 425.43 523.87 WOA 428.79 68.54 2135.3 423.25 124.92 KH 436.59 0.004 118.97 420.57 79.41Table 2
Table 3
Fig. 6

Table 4
For minimizing both cost and emission, multi-objective function is solved by ant lion optimizer (ALO) which is characterized by simplicity, high convergence ability and requirement of less controlling parameters. In ALO; population size of 50 and maximum iteration of 1000 are employed in simulation. Table
5
shows the hourly economic/emission dispatch of each generator power; this scheduling gives minimum cost of 187.81 €ct and minimum emission of 473.12 kg. Referring to results obtained in Ref. [
4
], the minimum cost is 191.0416 while emission is 721.08 kg. Regarding to Table
5
; during the first hours the load is dispatched economically between MT, FC and battery with the absence of PV and WT due to large bids, while the power is exported to the grid for almost hours. In the next hours; the RESs are sharing the growth of load after that the priority of MT and FC for covering load is placed. Figure
7
shows the variation of the ALO responses for cost and emission with number of iterations.
Optimal DGs powers for minimizing cost/emission in first scenario (cost = 187.81 €ct, emission = 473.12 kg) Hour 1 52 0 0.88 15.09 27.09 27.42 − 18.49 2 50 0 0.08 6.84 4.65 13.45 24.99 3 50 0 1.69 17.09 25.63 6.64 − 1.07 4 51 0 0.05 7.19 4.38 28.81 10.57 5 56 0 0.89 29.06 28.46 27.57 − 29.98 6 63 0 0.92 19.68 30.00 3.54 8.86 7 70 0 1.00 6.00 18.47 26.72 17.81 8 75 0.20 1.31 29.99 29.99 17.45 − 3.95 9 76 3.75 1.79 30.00 30.00 30.00 − 19.54 10 80 6.32 3.09 30.00 30.00 30.00 − 19.41 11 78 10.14 8.76 29.99 29.99 29.12 − 29.99 12 74 11.43 10.27 29.03 30.00 23.27 − 30.00 13 72 7.50 3.92 30.00 30.00 7.02 − 6.44 14 72 20.28 2.22 28.47 27.74 23.00 − 29.70 15 76 7.88 1.79 30.00 30.00 30.00 − 23.66 16 80 2.75 1.31 30.00 30.00 29.99 − 14.05 17 85 0.22 1.79 30.00 30.00 29.99 − 7.00 18 88 0 0.54 17.34 29.99 29.88 10.24 19 90 0 0.36 30.00 30.00 29.92 − 0.27 20 87 0 1.79 29.99 30.00 29.99 − 4.78 21 78 0 0.56 30.00 30.00 30.00 − 12.56 22 71 0 1.30 25.11 30.00 28.47 − 13.88 23 65 0 0.92 30.00 30.00 − 23.61 27.69 24 56 0 0.61 29.78 29.77 − 8.38 4.22 Time-response of ALO for economic/emission dispatch for first scenarioTable 5
Fig. 7

In this case; it is assumed that PV and WT are operated at their maximum powers in each hour while the other sources, MT, FC, battery and grid are operated at their allowable limits as given in Table
1
. KH is employed to solve the cost and emission dispatch as single-objective problem; the KH is simulated for 50 trials and the obtained results are compared with other optimization algorithms and tabulated in Tables
6
,
7
for each single-objective function. It is clear that; the best statistical parameters and optimum solution are obtained via the presented KH algorithm for minimizing operation cost or emission. For minimizing the operating cost, the KH succeeded in catching the optimum solution after 74.23 s which is the best computational time, while in optimizing the pollutant emission; it takes 75.83 s which is acceptable one compared to the other algorithms.
Statistical comparative results with other algorithms for minimizing operating cost (second scenario) Algorithm Average (€ct) Standard deviation (€ct) Worst (€ct) Best (€ct) Computational time (s) FSAPSO [ 599.99 0.007 600.00 599.99 NA GA 632.72 45.37 664.8 600.64 83.14 GWO 317.20 658.54 8337.5 687.77 134.57 PSO 1293.7 7.90 2164.3 645.26 473.22 WOA 683.87 204.57 5853.9 647.09 111.47 KH 629.63 0.001 268.91 592.86 74.23 Statistical comparative results with other algorithms for minimizing emission (second scenario) Algorithm Average (€ct) Standard deviation (€ct) Worst (€ct) Best (Kg) Computational time (s) FSAPSO 350.52 0.008 350.53 350.52 NA GA 370.24 27.82 389.91 350.57 80.29 GWO 561.55 1.54 46800 409.85 167.44 PSO 523.46 984.85 2443.5 404.02 454.74 WOA 477.09 68.84 2189.9 458.14 110.94 KH 365.17 0.004 814.51 339.72 75.83Table 6
Table 7
Multi-objective optimization problem is solved by ALO and the optimal power generated from each device is obtained and given in Table
8
. The obtained operating schedule gives total cost of 673.51 €ct and emission of 438.48 kg, while in Ref. [
4
] the obtained optimum results in that case is 735.16 €ct and 440.41 kg emission. Therefore, the ALO results are better than those given in [
21
]. The convergence curves of ALO for minimizing cost and emission in second scenario are shown in Fig.
8
.
Optimal DGs powers for minimizing cost/emission in second scenario (cost = 673.51 €ct, emission = 438.48 kg) Hour 1 52 0 1.78 6.00 3.00 18.80 22.41 2 50 0 1.78 26.33 7.09 − 10.44 25.24 3 50 0 1.78 6.00 17.36 − 5.14 29.99 4 51 0 1.78 11.04 12.03 28.98 − 2.84 5 56 0 1.78 6.89 24.95 8.10 14.27 6 63 0 0.90 22.04 4.50 5.56 29.99 7 70 0 1.78 12.48 4.76 22.37 28.59 8 75 0.19 1.30 27.80 12.08 29.17 4.44 9 76 3.75 1.79 15.01 8.63 29.25 17.57 10 80 7.52 3.09 6.00 24.21 29.99 9.25 11 78 10.44 8.77 19.23 23.71 28.43 − 12.58 12 74 11.95 10.41 15.61 3.74 29.53 2.76 13 72 23.90 3.92 17.11 18.94 4.73 3.41 14 72 21.05 2.37 23.83 26.95 27.80 − 30.00 15 76 7.88 1.79 12.28 29.28 22.21 2.57 16 80 4.23 1.31 30.00 30.00 30.00 − 15.53 17 85 0.55 1.79 30.00 30.00 30.00 − 7.34 18 88 0 1.79 16.36 18.49 21.44 29.93 19 90 0 1.30 6.33 22.98 29.54 29.84 20 87 0 1.78 29.97 29.97 1.51 23.77 21 78 0 1.30 26.62 27.38 6.71 15.99 22 71 0 1.30 29.69 29.77 28.76 − 18.51 23 65 0 0.91 12.05 4.22 28.88 18.93 24 56 0 0.61 26.71 28.52 10.56 − 10.40 Time-response of ALO economic/emission dispatch for second scenarioTable 8
Fig. 8

Finally, one can get that the proposed methodology incorporated KH and ALO presented in this paper is suitable and recommended for evaluating the optimum operation and management of typical micro-grid for economic/emission dispatch for the installed DGs. The obtained results via the two presented approaches are better than those obtained via either literature approaches or programmed algorithms for all studied cases.
The realization of less cost and less pollutant emissions from the distributed generation installed in typical micro-grid (MG) is significant challenge for many researchers. Therefor; this paper proposes methodology based on two recent optimization algorithms, krill herd (KH) and ant lion optimizer (ALO), for minimizing the total operating cost and total pollutant emission as single and multi-objective problems. The first approach is employed to solve single-objective while the second is used for economic/emission optimization. The installed DGs in MG are PV, WT, MT, FC and battery in addition to the grid. Two scenarios are studied in this work; the first one is operating all DGs in their specified limits while the second is operating PV and WT in their maximum limits. In the first scenario; the proposed methodology based on KH for solving single-objective optimization problem succeeded in obtaining the best solution for optimal cost and optimal emission of 105.94 €ct and 420.57 kg after acceptable time of 104.17 and 79.42 s, respectively, the obtained results via KH are the best compared to other reported approaches. In the second scenario; the best results are obtained via KH of optimal cost and emission as 592.86 €ct and 339.71 kg obtained after acceptable computational time compared to the others. On the other side, the ALO succeeded in solving the multi-objective function of both cost and emission obtaining the optimal values of 673.51 €ct and 438.48 kg for cost and emission, respectively. The obtained results via the presented algorithms, KH and ALO, for both single and multi-objective optimizations in all studied cases are favorable and efficient compared to the others.
Springer Nature remains neutral with regard to urisdictional claims in published maps and institutional affiliations.