Management of Microgrid System Based on Optimization Algorithm

Currently, due to the industrial progress in the world and the increase in population numbers led to the occurrence of an economic crisis as well as environmental pollution; for which there are microgrid advances capabilities and the use of renewable sources, for production the energy at high quality and lowest cost possible. So, there are many effective algorithms can be utilized for a purpose schedule energy production among available sources of energy in the microgrid system. A microgrid with two diesel generators, two wind turbines and three fuel-cell plants has been used as a case study. Firefly algorithm (FA) nature-inspired algorithms are among the most efficient algorithm for optimization, the proposed method used to optimize schedule generation in a microgrid for 24 hours at minimum cost. Moreover, the results are validated by performing various tests of the algorithm parameters and have proven that the method is efficiently done for scheduling optimum power generation in the microgrid.


Introduction
At present, there are a lot of power systems in there of interest in using microgrids (MGs) as they are a flexible, smart and energetic energy network [1]. MGs is classified according to the type of operation as grid-connected mode and islanded mode which the distributed energy resources (DERs) that supply the loads directly without connected to the grid [1], [2]. The microgrid is one of the power systems which produces electrical energy from renewable sources [2]. The MG group consists of groups of distributed generator (DG) units and electrical loads. The best solution to the energy crises is the MG group with renewable energy sources. So, the MG is connected to the utility grid for better compensation for energy demand. MG absorbs or injects energy when there is a higher demand or extra energy is supplied, respectively [3]. Consequently, the economic operation is the important issue of a microgrid. Many researchers are studying how to optimize microgrid operational activities [1], [ 4].
To minify the cost of implementation of microgrid power generations there are several methods of improvement which the researchers used [4]. Rajesh Kumar et.al [5] applied biogeography based optimization algorithm (BBO) to evaluate the optimum sizing of components and operational strategy reduces the overall hybrid power system costs while ensuring energy availability. Basu and Chowdhury [6] have been presented cuckoo search algorithm (CSA) to solve the issues of fossil fuel generators convex as well as nonconvex ED (economic dispatch). Moshi et.al [7] utilized genetic algorithm (GA) and general algebraic modeling system (GAMS) in a microgrid network of four diesel generators, the scheduling of generators is improved to obtain the best energy value. Modiri-Delshad et al. [8]used a cuckoo search algorithm to minimize total generation cost within 24 hours to improve the production of the microgrid. Peng Li et al. [9] are presented Binary gravity search algorithm (BGSA) for optimization MG's schedule of operations and dynamically optimize microgrid which involves optimized dynamic unit engagement and power dispatch. On another hand, the artificial fish swarm (AFS) algorithm is used by Kumar et al. [10] depending on the available renewable energy sources, it is used as an access to arrive at an optimal scheduling solution. Shariatzadeh et al. [11] have been proposed a solution to the IOP Publishing doi:10.1088/1742-6596/1773/1/012006 2 problem of shipboard microgrid power system (SMPS) by applied particle swarm optimization (PSO) technique add that utilize genetic algorithm (GA). Abdullah et al. [12] optimized the operation scheduling of microgrid by proposed a firefly algorithm (FA) whichused within a 24-hour period to find out the best energy production, provided the cost as low as possible . Aghajani and Ghadimi [13] had been used particle swarm optimization (MOPSO) method for the management and optimization of the proposed distribution of energy resources microgrid management for minimization the operation cost and pollution rate. In previous studies for operation of MG to reach the optimal, there are many optimization method used which certain flaws and examples of these defects with premature convergence and higher convergence aarithmetic time [14].
The FA's explanation of scheduling the output of a generator in a microgrid system for the optimum cost in each hour during one day. Also, the FA is tested by changing the algorithm parameters and studying its effect on generation costs. The residuum of this paper is constructing as follows: Section 2 modeling microgrid operation optimal and problem formulation in Section3. Section 4 demonstration the proposed optimization method FA Section 5 consists of the analysis of results and discussion of simulations. Then, the summarized conclusions were given in Section 6.

The Modelling of Microgrid
A case study contains several technologies is used to model the microgrid to generate power such as the diesel generators, wind turbine generators and fuel-cell plants. To evaluate the optimum power output of any generator in each hour to find minimum cost within 24 hours of the considered microgrid, the objective function represents the minimization of the total generation cost ( total FC ) of microgrid which is illustrated in (1) to (5) as follows: , and N fuel reflected diesel unit numbers, wind unit numbers and the numbers of fuelcell plants respectively, T is the scheduled time, , ( )is the cost of generating the ℎ diesel unit during the scheduled period (t), which is usually designated by a quadratic function, , ( ) is the processing power of the th i unit, the diesel power plant cost function [6], [8], [12].
That is the production power of a th i wind generator during the planned period t. The wind generators depend on wind velocity. v − represent cut-in, nominal, and cut-out wind speeds, respectively [6], [8], [12]. ) ( , t F i F , are th i fuel-cell plant generation costs at time t, as shown in Equation (5), where i F ,  are the ℎ fuel-cell system efficiency. The cost of producing fuel cell is considering the efficiency of energy production ( The power created by all generating units must be matched the demanding power (PDemand (t)) for every scheduled period (t). As presented in the following:

Behaviour of Firefly Algorithm
Xin-She Yang developed FA in 2008, at Cambridge University which was inspired by the behavior of fireflies. In essence, FA uses the following three idealized rules [15], [18].
1) Despite their sex, each one firefly is attracted to another.
2) The less bright firefly will move towards the firefly brighter and will be a random movement if there is no brighter.
3) According to the brightness of a firefly, the objective function is specified. In the firefly algorithm, there are two important issues: The variation of the light intensity( )and the formulation of the attractiveness( ) [16]. The steps of this algorithm are as follows.

Attractiveness
The relationship between the firefly's brightness and the objective function is directly proportional. The FA begins with the initialization of a population of fireflies, but each firefly is various from the other one in the swarm. The light of the firefly influences the firefly's internal motion. The intensity of light is different from the distance d and is obtained by: Io The original light intensity; the firefly's attraction is: Whereβf is the light absorption coefficient; is indeed the attractiveness in the d = 0.

Distance and Move
The difference between either firefly i and j is represented as the Euclidian distance at , and , .Cartesian function can be estimated according to the following: Where, , is the k-th element of the spatial coordinate of i-th firefly position, , is the k-th element of the spatial coordinate of i-th firefly and n is that the number of problem variable/dimension. Each firefly i move to the more attractive firefly j, as follows:

Handling Mechanism Restriction
Optimization of two methods of handling constraints to investigation the power balance and generation constraints as the following: First way to do this is collective the penalized restrictions transgression including objective functionality and fitness function creation. It is, however, difficult to guarantee the solution generated [8], [12]. Second-way techniques begin optimization with achievable solutions and just function with reasonable solutions in the optimization process. This process realizes objective functionality as our fitness function. By using the iterative process the infeasible solution can be repaired to make sure that every solution is found is unfeasible is become a feasible solution that attained the constraints [8], [12], [19], [20]. Consequently, it could meet the restrictions of the power balance efficiently. So, this paper takes into account the second method.

Results and Discussion
The proposed firefly algorithm applied for the determination the optimum cost of microgrid system and tested this algorithm. Furthermore, FA has the ability to schedule the optimal generation in the microgrid. In this study, the microgrid is consisting of several traditional and renewable energy power plants these two generators of diesel, two wind generators and three fuel cell plants for producing electric power. Information on the system comprehensive cost coefficients, power of load are assorted in Tables 1 and 2. Characteristic of the wind turbine; cut-in, rating, and cut-out velocities are respectively 5, 10, and 15 m / s. The parameters setting of FA for α, ,γ and MaxIter are 0.1, 0.1, 0.1 and 500 respectively. Therefore different values are set at each parameter as well as the simulation is performed for each case. Since the FA is initialized randomly, the number of 30 in every case the experiments are carried out at each hour for minimum and average, to describe the difference in attractiveness as well as its value that is responsible for the FA Convergence speed [21], [22]. The simulation results are done using MATLAB2017b on a PC (Intel(R) core (TM) i7-75000 CPU@ environment 2.70 GB, 2.90 GHZ). Firefly algorithm is tested for different values for the parameters such as the number of iterations, the population of fireflies, absorption coefficient, an attractive coefficient based and randomization coefficient to obtain optimal minimum cost.

Effect of Different Population Size
If population (n) is comparatively big, the attractiveness or brightness with all fireflies can be ranked using one inner loop that uses sorting algorithms [16]. The results of FA is better to minimize the operation costs of the microgrid in population size of 100 compared to other population sizes of 20 and 50 at the tested for trial 30 runs for finding the best minimum of cost for each hour, the minimum cost through 24 hours of 100 is (30968.1056$) which represents the minimum cost compared to other less population size. In addition to that, the distribution for the optimum power schedule in 24 hours is presented in Fig. 2. To clarify more, the convergence curve for different population sizes appear in Fig.  3. Table 3 gives comparative results for different population sizes. Fig. 4 represents the different population sizes and the minimum cost from using FA.

Effect of number of iteration (Itermax)
The optimization results imply that the firefly algorithm is potentially more powerful when utilizing high-value iteration than other less value of iteration [22]. At iteration of 500, FA does the best operation for MG with the lowest generation cost compared to another case 100 and 250 at system hourly load demand as shown in Table 4 and in the Fig. 5 represented the different population sizes and the minimum cost from using FA.

Effect the value of light absorption coefficient (γ)
The number of the population size is used 100 and the maximum number of iteration is fixed 500 for each case. This parameter indicates the attractiveness variation, as well as its value, is responsible for the speed of FA convergence and how the FA algorithm behaves. In theory, γ є [0,∞), for the fact the coefficient of light absorption varies from 0.1 to 10. If γ=∞, then in this case would mean, that fireflies are surrounded with a very thick fog and could not see any of the other fireflies, the absorption coefficient depends more on a problem itself rather than the search space size [16], [21], [22], [24]. That is, the different values of (γ) shown in Fig. 6 which present the optimization minimum cost in the microgrid system at a minimum value of γ is 0.1.  The parameter determines the step-size towards the optimum solution. Thus, it performs a process that controls on the attractiveness and parametric studies suggest that β o = 1can be used for most applications [16], [24] . So, = it's becoming a simplistic random walk. Thus, Fig. 7 shows clearly that the lower optimal results are reached when = . , and this choice according to tuning the parameter of FA for the problem of the microgrid as in Fig. 7.

Effect the value of randomization coefficient value (α)
The randomized parameter α, it represented a random number between (0, 1) determine from a Gaussian distribution, it defines as the size of the random step. The random distribution has a role in the movement step with its effective influence on diversification, which is an important feature of the met-heuristic methods, with a definitive object for exploring the research area effectively [23]. The results of optimum cost in microgrid system are obtained at (0.1) as shown in Fig. 8.

Comparison of the Optimal Result
The FA is a meta-heuristic algorithm. So, in order to attain higher quality solutions, the parameters must be tuned. Thus, a different value is selected of every parameter as well as the simulation is performed for each case for tests of the algorithm parameters and have proven that the efficiently operating method. Since the FA is initialized randomly, the consequence of the optimum cost achieved by the FA approach proposed was compared with the cost of the same method, to get a better optimal result. But in this paper use number of 30 trails is executed for each hour through in 24 hours to reach at optimal cost result, which has (30968.1056$) is considered less than the cost compares with the executed number of 30 trails within 24 hours (31223.69$) in [12] .

Conclusion
In this paper, the microgrid system energy management issue has been analyzed to the optimal cost of electric generation in each hour for 24 hours and scheduling optimal power generation to reduce electricity cost by proposed firefly algorithm. Simulation results demonstrated that FA performs efficiently and scheduled optimal power generation at a minimum cost when test both the maximum population of fireflies and number of iteration. Add that, when the population of fireflies increase the computation time is also increasing. Furthermore, we have tested this algorithm to the objective minimization problem of the cost function. The parameters of firefly algorithm such as the light absorption coefficient, attraction coefficient minimum value and randomization coefficient depend on the optimized problem and we find that for choosing the suitable algorithm parameters for the problem there are two methods, one method is tuning the parameters and the other method is to modify the parameters while runs.