A memory-based gravitational search algorithm for solving economic dispatch problem in micro-grid

micro-grid


Introduction
The reliance on micro-grids has been growing throughout the years due to the increasing energy demand. Therefore, a microgrid that is capable to provide optimal and reliable energy is required [1,2]. Currently, there are many problems related to micro-grid systems such as energy management, scheduling and generation optimization [3].
The optimal economic dispatch in the energy management system (EMS) is among the critical and challenging problem that needs to be addressed [4]. Economic dispatch aims to find the optimal power shares from multiple generation sources while considering constraints such as minimum cost and generation limitation [5,6]. There have been many methods been proposed for economic dispatch optimization problems. Various classical optimization techniques utilized such as QP has been employed to solve economic dispatch optimization [7]. In [8], the author proposed the Linear Programing (LP) to solve economic dispatch problems subjected to environmental constraints. Meanwhile, economic dispatch has been solved by the lambda dispatch method, which based on mathematical iteration in [9]. A mathematical method, such as sequential quadratic programming (SQP), has been implemented to solve the security-constrained economic dispatch [10]. Moreover, the non-linear programming (NLP) also been used to determine the optimal economic dispatch in [11,12]. Additionally, the mixed-integer linear programming (MILP) were utilized to settle the bid and offer based on the economic dispatch problem in [13]. MLIP proposed in [14] to optimize micro-grid operation while minimizing the costs of the internal power supply from renewable energy resources (REs) and the external energy from the primary grid. The authors in [15,16]  programming to optimize the micro-grid and battery operating cost, respectively, via solving the economic dispatch. These classical methods have drawbacks such as poor performance in solving the optimization while using extensive computational resource.
Over the years, many researches were found utilizing metaheuristic optimization techniques to solve economic dispatch problems having higher performance compared to the classical methods. For example, the GA has been applied to solve the economic dispatch problem in [17][18][19]. The author in [20] proposed GA to minimize the total cost generation of 20 units of generator system in an IEEE 30 bus system. Other metaheuristic optimization techniques have been applied to solve economic dispatch problems are PSO [21,22], Differential Evolution (DE) [23,24], and Ant Colony Optimization (ACO) [25], The Jaya algorithm (JAYA) and GSA also been proposed for economic dispatch optimization as in [26][27][28]. Although there was an improvement compared to previously obtained results, the metaheuristic techniques suffer a critical obstacle which are the less memory that is used for storing the best solution for multiple iteration and setting the parameters properly. This limits the performance and highly impact the quality of the solution, particularly in the high dimensional number of the problems.
Additionally, the hybridized optimization techniques are another approach been used to determine the optimal economic dispatch. The hybrid approach is robust and perform better to solve a non-convex problem [28]. For instance, the multi-hybrid approach utilizing PSO to solve the economic dispatch problem was proposed in [28]. Furthermore, GA and Whale optimization algorithm (WOA) utilized to solve the economic dispatch problem considering the minimization of the fuel cost and emission dispatch problem in [29]. The author in [30] proposed combining JAYA and Teaching-learning-based optimization (TLBO) algorithms for the solution of economic dispatch. Moreover, other hybrid optimization methods used are GA and bacterial foraging optimization (BFO) as in [31], a modified genetic algorithm and a highly improved version of particle swarm optimization (MGAIPSO) in [32], and multi-combination of algorithm called ACO-ABC-HS as in [33].
The shortcomings of the hybrid techniques are the search space, where the algorithm may easily struggle to seek local minima or shows misleading results in the case of premature convergence.
Considering the drawbacks mentioned from previously proposed methods, a more robust method using MBGSA is proposed in this study. The MBGSA were used to determine the optimal economic dispatch in a micro-grid comprises of multiple generation sources. Compared to the conventional GSA, MBGSA use of memory to boost the capability and efficiency of GSA. The micro-grid's model consist a two REs, three generators and CHP. The results provided compared with the QP and metaheuristic optimization techniques such as ABC, PSO, GA, GSA.

Problem formulation
Economic dispatch goal is to determine the optimum generation in a distributed energy resources (DERs) system while minimizes the total power generation cost [34]. The EMS plays as the central control unit in the micro-grid to select the operation mode of all DERs units and loads. The economic dispatch system included in the EMS, which is consisted of an optimization module, is illustrated in Fig. 1.
A quadratic equation was used to formulate the economic dispatch problem as [35]: where a; b; c are the cost coefficients of the i DER ($/kW) unit, C is the generating cost ($) associated with each i DER, and P is the power generated by DERs (kW) unit. The objective function of a standard economic dispatch problem in the microgrid is to minimize the total generating cost of DERs and is given by: where OF is the objective function, and n represents the total DER in the system. As shown in Fig. 2, The EMS operates with the optimal share to meet the power demand while the total power generated is minimized.
Also, the objective function (2) is subjected to the constraints given below: (1) Power Balance The total generated power of all DER units should be equal to the power demand P L from the loads considering no losses of power in transmission: The primary objective function is defined by: (2) Generation limits The power output of each DER unit operates within the lower and upper limits. The inequality constraint is given by:

Gravitational search algorithm
The approach of the gravitational search was developed by Rashedi et al. [36]. It considers the principles of mass interactions and the law of gravity as fundamental.
This metaheuristic optimization technique generates a population called agents, which are based on the stochastic search method. The search agents in the GSA algorithm are represented as a set of masses that can react with each other based on the Newtonian gravity and the laws of motion. The position of the mass is considered as the solution to the problem. All these masses attract each other by the gravitational force, which can make a global movement of the masses toward the best solution. The agent with heavy mass corresponds to the best solution; consequently, its moves are slower than the lighter ones, and its gravitational and inertial masses are determined using a fitness function [37].
The algorithm Initially, defines the position of the i th agents randomly with N dimension: where n is the number of the decision variable. The number of iterations,t and the acceleration of the agent, i, are calculated as below: where e is a constant, Kbest is a function that allows to control the GSA performance and to avoid local optimum stagnation [38]. M j t ð Þ is the mass of the j agent shown below: In which: where fit t ð Þ represent the fitness value of the agenti at t iteration. Meanwhile, best t ð Þ represent the minimum value in fit at t iteration. worstðtÞ represent the maximum value in fit at t iteration.
R ij t ð Þ is the Euclidean distance between the locations of X i ; X j of agents i andj respectively and given as: G t ð Þ is calculated as below: where G t ð Þ is gravitational constant, b is a constant gradient value, t is the current iteration and t max is the maximum number of iterations. This following equation updates the new position and velocity of the agent as below: where rand is a uniform random variable in the interval between [0, 1]. The basic GSA flowchart is shown in Fig. 3. In GSA, the gravitational force is a communication tool between the agents. Meanwhile, the gravitational constant G t ð Þset the accuracy of the search, that lower the number of iterations [39].

Memory based gravitational search algorithm (MBGSA) for economic dispatch
The traditional GSA does not store the best agents in the optimization iteration because of the position of agents related to the previous iteration. Consequently, it does not ensure that new positions of the agent are best than the previous positions when searching for the best solution. Hence, GSA may lose the optimal solution from the previous iteration, and this downside limits the performance of GSA in the complex optimization problems.
In MBGSA, the best position of any agent is stored as the agent's personal best position (pbest). Meanwhile, the new positions of agents are calculated based on the best values to avoid loss of the optimal search path and guarantee that the new agents are   turning towards the best solution [38], Therefore, the equations represented as follows: As shown in Eq. (14), the position of element j is adjusted towards pbest j t ð Þ, instead of the position of element j in the instant X i ðtÞ as in Eq. (7). On the other hand, the distance is measured from the j best to the other agents' positions as in Eq. (15), rather than the current position i. The masses of the elements are calculated based on the best performance of the agent from the first until the iteration number t. The actual positions do not need to improve when use the best positions of agents to find the new acceleration for keeping the optimal path efficiently, which makes the agents headed towards the optimal position in the optimization process constantly. These adjustments make MBGSA more robust compared to the conventional GSA. Fig. 4 illustrates the flowchart of the proposed MBGSA in solving the economic dispatch problem.

Results
Day-ahead scheduling of the DERs in the micro-grid should be taken into consideration to obtain the optimal result in generation cost, and all power sources connected are required for reliable supply [40].
The DERs schedule can be estimated by using a forecast model based on the datasets collected by meteorological station [41]. An optimization strategy has been used to find the optimal economic dispatch over a period of 24 h.
The proposed method has been tested on the IEEE 37 bus as in [42], and the wind power system has been replaced by a diesel    generator. The model of the proposed method is presented in Fig. 5.
Where the system comprises of three diesel generators, two PV plants, and a CHP station. The hourly load demand is shown in Fig. 6.
The three diesel generators and the CHP have a capacity of 400 kW, 500 kW, 600 kW, 1000 kW, respectively. The PV generation output uses actual data taken from existing PV system in Power Electronics and Renewable Energy Research Laboratory (PEARL) at the University of Malaya, Malaysia. The PV generation was forecasted based on machine learning techniques as described in [43] to forecast the solar irradiation and temperature in the next 24 h. The solar radiation and temperature inputs are shown in Fig. 7 and Fig. 8.
The power generation from the solar panel in the next 24 h is presented in Fig. 9. Table 1 illustrates the cost coefficients of each generator in the micro-grid.     The performance of the proposed method was evaluated with quadratic programming and other metaheuristic optimization techniques. MATLAB SIMULINK 2019 was used for this work and was run on an Intel (R) Core i5-8400 CPU, 2.8 GHz a lab computer with 8 GB RAM under Windows 10.

MBGSA parameters setting
The standard parameters of MBGSA such as the population size and the number of iterations have been set to 50 and 100, respec-   Cognitive coefficient - Random cognitive coefficient - Random social coefficient - Gradient constant  tively. Table 2 below shows simulated results of four cases when the parameters of the MBGSA (G 0 , b) are changed, and the total cost of generation for 24 h in each case. Figs. 10 and 12 represent the comparison of the power generation by DERs using the MBGSA through utilizing the 1st and the 2nd case parameter and the power demand at each for a period of 24 h. It can be noted that the power generation unable to meet the load demand several times. On the other hand, Figs. 11 and 13 shows the contrast the power generated by DERs and the power requested for 24 h using the MBGSA while setting the parameters in the 2nd and 4th case. The power generation from the DERs able to meet the energy demand. Moreover, the total cost generating using MBGSA for 24 h is $ 3,743,936.92 and $ 3,740,268.35 in the 2nd and 4th case, respectively. The parameters in the 3rd case shows better results than the 4th case.

Comparison with metaheuristic Methods:
In this study, the MBGSA and GSA in the parameters that have been utilized in the 4th case. The results are averaged over 100 runs and carried out to account for the variations in the result. The best results are shown for each optimization method. The other parameters are shown in Table 3. To expand the search space and obtain satisfactory evaluations, the standard parameters such as the initial population, the number of iterations were set to 200 and 1000, respectively. Fig. 14 shows the power generation and the load demand optimized by the MBGSA method. The power generated from the DERs is able to meet the load demand. On the other hand, other optimization techniques, such as the GSA, GA, PSO, and ABC, also meet the energy demand successfully. Figs. 15-19 show the optimal power delivered by DERs using MBGSA, GSA, GA, PSO, and ABC, limited to generation constraints.
The performance evaluation between the methods is shown in Table 4. The results illustrate that the cost obtained based on MBGSA is the lowest compared to the other algorithms for every hour. The proposed method is found to have the best optimization performance compared to other methods in solving the optimal dispatch problem by having the lowest total cost in 24 h. Fig. 20 demonstrates the convergence ability between MBGSA and other metaheuristic techniques used in hour 24. The conver-         gence is shown in the expression of cost function value versus iterations. It is apparent that the technique proposed has converged faster with a smaller number of iterations. Moreover, the results also indicate that the proposed method is able to obtain the best results even with the absence of PV generations.

Comparison with quadratic programming
The same test system has been solved by using QP. Fig. 21 shows the representation of the quadratic equation Eq. (2). Fig. 22 shows the optimal power delivered by DERs using QP, and the constraints in each generator have been attained. Meanwhile, Fig. 23 illustrates the value of the generation cost at each hour of the day obtained by PQ. The total cost generation is 3733453.159 $ in the 24 h. Based on these results, it's clear that the MBGSA obtained a lower cost than QP, with a value of 4,524.48 $.

Conclusion
This paper proposes an MBGSA approach for solving nonconvex economic dispatch problem considering DERs constraints. The proposed optimization technique employs a memory storage to keep the best solution of the previous iteration to enhance the memory performance of the conventional GSA. The method has been tested on an IEEE 32 bus system comprises of three diesel generators, two PV plants, and a CHP station. The results have been benchmarked against classical QP method and other metaheuristics optimization techniques such as GSA, GA, PSO, and ABC. The proposed method obtained lower generation cost for each hour for the 24-hour period in solving the economic dispatch compared to the other methods. Hence, the proposed MBGSA has higher performance and robust in solving economic dispatch problems in a micro-grid system.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.