Self-adaptive Genetic Algorithm and Fuzzy Decision Based Multi-objective Optimization in Microgrid with DGs

Shanyi Xie1, *, Ruicong Zhai1, Xianhu Liu2, Baoguo Li2, Kai Long3, Qian Ai4
1 Electric Power Research Institute of Guangdong Grid Company, China
2 Guangdong Grid Company of Jiangmen Power Supply Bureau, China
3 Shanghai Huali Software System Company Limited, China
4 Shanghai Jiao Tong University, China

Article Metrics

CrossRef Citations:
Total Statistics:

Full-Text HTML Views: 761
Abstract HTML Views: 578
PDF Downloads: 232
ePub Downloads: 123
Total Views/Downloads: 1694
Unique Statistics:

Full-Text HTML Views: 449
Abstract HTML Views: 311
PDF Downloads: 171
ePub Downloads: 76
Total Views/Downloads: 1007

©Xie et al.; Licensee Bentham Open.

open-access license: This is an open access article licensed under the terms of the Creative Commons Attribution-Non-Commercial 4.0 International Public License (CC BY-NC 4.0) (, which permits unrestricted, non-commercial use, distribution and reproduction in any medium, provided the work is properly cited.

* Address correspondence to this author at the Electric Power Research Institute of Guangdong Grid Company, China; E-mail:


Microgrid is one practical infrastructure to integrate Distributed Generations (DGs) and local loads. Its optimal operating strategy has aroused great attention in recent years. This paper mainly focuses on the multi-objective optimization of DGs in microgrid by using self-adaptive genetic algorithm (GA) and fuzzy decision. Five objective functions are taken into account comprising voltage offset, transmission loss, construction cost, purchase cost and the environmental cost. In the algorithm, self-adaptation in population size, mutation probability, selection and standardization of objective functions is developed to enhance the speed and efficiency of the algorithm. Moreover, fuzzy decision is applied to determine the final solution. Simulation results show this algorithm can effectively find the optimal solution and improve the real-time control of microgrid, which implies the possibility of potential applications in microgrid energy management system.

Keywords: Distributed Generation, Fuzzy decision, Multi-objective optimization, Pareto solution, Self-adaptation genetic algorithm.


With the development of microgrid (MG) and distributed generation (DG), making full use of DGs has become anindispensable issue in MG. The utilization of DGs have led to many benefits such as reduction in line loss, improvement in voltage profile, enhancement in power quality and reinforcement in system reliability and security [1].

Economic benefits could also be seen in deferred investments for upgrades of facilities, reduced O&M costs of some DG technologies, enhanced productivity, reduced health care costs due to improved environment, reduced fuel costs due to increased overall efficiency, reduced reserve requirements and the associated costs and lower operating costs due to peak shaving. Moreover, environmental benefits include reduced emissions of pollutants and encouragement to renewable energy based generation [2].

There lie many difficulties in the development of DG, one of which is the coordination of every DG unit. With the propose of multi-agent system (MAS) [3] and energy management system (EMS) [4], it has been a promising method to solve the coordination problem by applying advanced real-time data acquisition system to recognize the system state and optimize system parameters according to its state.

Many works have been done to study the optimization of DG units from many aspects. Paper [4] pointed out that intelligent data analysis and optimal dispatch are developing requirements of energy management of MG. In paper [5], optimization of DGs’ market profits was solved based on GA. In paper [6], operating cost was targeted and linear programming was used to optimize the distributed system consisting of wind farm, battery and photovoltaic (PV). Final results proved the great significance of the battery life and generated power. Paper [7] adopted GA to minimize line loss of IEEE-30 bus standard testing system.

The afore-mentioned papers only focus on single objective optimization of distributed system, while there exist trade-offs among different optimization targets in most cases. In paper [8], comprehensive consideration of system capacity, voltage level, line loss, and generation cost is taken into the optimal dispatch of the system comprising distributed sources. A self-adaptive algorithm is proposed to solve the optimization problem. However, it only considered the power dispatch of loads and the number of generation nodes in the simulation system was too small. Furthermore, some re-searchers have presented the optimization problem of DGs’ locations and sizes [9-20]. In paper [9], the proposed algorithm can not only deal with more than one DG’s allocation but also handle the situation considering discrete load models. Paper [10] focused on the important task of finding the optimal site and sizing of distributed generation units for a given distribution network based on genetic algorithm and optimal power flow calculations. In paper [11], a comparative study of a new proposed Rank Evolutionary Particle Swarm Optimization (REPSO) method with Evolutionary Particle Swarm Optimization (EPSO) and Traditional Particle Swarm Optimization (PSO) is performed in optimal sizing of DG. In paper [12], a novel optimization problem was proposed to determine the maximum distributed generation penetration level by optimally selecting types, locations and sizes of utility containing DG units. The DG penetration level was considered to be limited by harmonic distortion and protection coordination constraints. Paper [20] provided an overview of several methodologies which has been adopted for finding out optimal locations of distributed generators in distribution system in order to maximize benefits.

Genetic Algorithm (GA) is one of the optimization algorithms, which is invented to mimic some of the processes observed innatural evolution [2, 21]. GA is stochastic search techniques based on the mechanism of natural selection and natural genetics. There are three major advantages to apply GA to optimization problems [22]. One is that GA does not have much mathematical requirements about the optimization problems. Second is that the evolution operators make GA effective at performing global search. Third is that GA provides a great flexibility to hybridize with domain dependent heuristics to make an efficient implementation for a specific problem.

Aiming at the real-time control of microgrid in a MAS or EMS, this paper addresses the optimization problem of DGs’ active and reactive output power comprising different kind of renewable source based on self-adaptive genetic algorithm. Five objective functions are taken into account, line loss, voltage offset, operating cost, including environmental cost, construction cost and purchase cost. Meanwhile, fuzzy decision is used to select an appropriate solution from all the Pareto solutions. The tested example shows that the pro-posed algorithm can find an optimal solution according to the actual demand effectively and efficiently due to its self-adaptation. As a result, it can significantly improve the real-time control of MAS or EMS in microgrid.


Supposing that there are p objectives in an optimization problem, the functions of the problem can be generalized as following:


Here g(x) and h(x) are constraints of the problem. In most situations, if one objective reaches an optimal value, another onemay move away from the optimal value. In other words, it is difficult for all objectives to get to the optimal value at the same time. Nevertheless, there exist some solutions referred as Pareto solution that no objective value can get better while the other objective values would not get worse. Pareto solution represents a stable condition for all variables; hence it is widely used as optimal solution in multi-objective optimization problems.

In this paper, we focus on the optimization problem of microgrid comprising a set of DGs, which includes line loss, voltage offset, construction cost, purchase cost and environmental cost in objective function. Supposed that the main grid mainly uses fossil fuels and the microgrid uses renewable energy, the purchase cost could be regarded as the cost of buy power from the main grid to the microgrid.

Because the network reconfiguration is not considered here and the load and line parameters are already known, the power generated by DGs could be calculated. Subsequently, Newton-Raphson Power Flow Algorithm can be applied to estimate bus voltages and line losses. Suppose that number i line’s line loss is Plossi, the total line loss could be calculated as following:


As to bus voltage offsets, if they are set as constraints, the number of constraints will explode greatly, resulting in deteriorated algorithm performance and decrease of algorithm convergence speed. The only way to solve the problem is to expand the population and adopt many penalty functions in risk of sacrificing the dominating status of objective functions. However, since there are many flexible voltage-regulation methods, single bus voltage should not be stickled in the algorithm of real-time control in micro-grid. More attention should be paid to the performance of algorithm on a whole. In this paper, the voltage offset is taken as one of the objective functions, accompanying with a penalty function. Supposing the number i bus voltage is (p.u.) Ui, the voltage offset is denoted as |Ui - 1|. Assuming that the allowed voltage ranges from 90%-110%, the constraint scan be expressed as |Ui - 1| ≤ 0.1. In order to apply the constraints in GA, the voltage offset function is designed as following:


On the whole, the function is the standard deviation of all bus voltages, taking 1 for the average value. In eq. (3), is the left rounding operation for the expression in the square bracket,thus the exceeding part will be ten times than the original, penalizing the objective value to a larger number. In order to obtain a better effect of penalty, 5% voltage offset is used in practice.

As mentioned before, the purchase cost is generated by buying power from the main grid. If the microgrid is operating in islanded condition, the massive capacity battery can be regarded as the main grid. The balance bus power, which represents the power needed to buy from the main grid could be calculated from Newton-Raphson Power Flow Method, supposed as Pin.

The distributed sources discussed in this paper include micro gas turbine, fuel cell, wind power, and solar energy. Their construction and purchase cost is shown in Table 1.

Table 1.

Operation and construction cost of some distributed generation.

Source Type Power Size (kW) Construction Cost (Y/kW) ElectricCost (Y/kW)
Micro Gas Turbine 25-75 8000-12000 0.44-0.8
Fuel Cell 5-2000 24000-32000 0.6-0.8
Wind Power 20-2000 8000-12000 0.8-1.2
Solar Energy 1-100 12000-52000 1.2-1.6

Most renewable energy has a characteristic of high construction cost, low maintenance and operating cost, zero fuel cost [23]. Its construction cost can be evaluated simply and effectively by eq. (4) [24]:


where r is fixed interest rate, n is lifetime of apparatus (generally ten years), Cinv is construction cost, k represents average capacity coefficient, COM is the electric cost, Cf is fuel cost considered as zero because none fossil fuel is used in distributed sources.

Thus, the total construction cost could be estimated by eq. (5) where αi represents the capacity percentage of distributed resource i.


Environment cost is denoted as eq. (6) [25], where NP is the kind of pollutant, Vej is the environment value per unit of pollutantj, Qj is the amount of pollutantj, Vj is the penalty of per unit pollutantthat could be found in related references.


In summary, eqs. (2,3,5,6) and balanced bus power make up the objective functions in this paper, shown as eq. (7):



GA is one of the most successful intelligent algorithms. It mainly consists of chromosome coding, producing initial population, getting the fitness function value, gene operation, choosing next generation and termination of the algorithm. In order to enlarge the generation for inheriting, it is useful to do genetic operations before choosing. Because the objective functions are continuous, there are countless Pareto solutions actually. In practice, in order to accommodate more Pareto solutions, the scale of every generation is changing during the algorithm.

Suppose that the initial population is NP0. The chromosome is made up of the kind of distributed sources and the generated active and reactive power, coding in real matrix. Considering a 7-bus system, 1, 2, 3 are the DG buses, the chromosome of them are coded as Table 2.

Table 2.

Matrix coding of chromosome.

Active Power P1P2P3 0 0 0 0
Reactive Power Q1Q2Q3 0 0 0 0
Source Type j1j2j3 0 0 0 0

Gene manipulation contains crossover and mutation. Theyrandomly set two sites for cut and both the two obtained new chromosomes are transferred to next generation. In addition, in order to make an effective cut, the cutting site must appear between non-zero elements. The mutation is realized by a disturbance of active and reactive power. The probability of crossover is set as 95%, while that of mutation is 10%. In fact, the probability of mutation represents the ability of global searching. So the probability can be adjusted during the procedure according to iteration times to accelerate convergence rate and realize self-adaptation to some extent. The next generation is legal and need not to be regulated, consist of new NP0 chromosomes.

For fitness function, it is needed to scaling the objective function. Dynamic linear scaling is used in this paper in eq. (8) as following:


where f(x) is the objective function, fmax is maximum value of the objective function, ηk is a small number to increase the inheriting probability of the worst chromosome, and thus diversify the genes in the next generation. ηk decreaseswhen iteration time k increases, resulting in the acceleration of the convergence rate gradually.

The selection strategy could be divided into two stages, one is to get the Pareto solutions, and second is to generate other chromosomes by proportional selection. The way to get the Pareto solutions refers to NSGA-II [26]. Suppose there are NPi chromosomes in generation i, set one global saver for Pareto solutions. At beginning, put one solution into this saver, then compare the rest solutions with the one in saver, if the one outside one is inferior to the inside one, ignore the outside one; otherwise, if the outside one is superior to the inside one, delete the inside one and put the outside one into the saver; if the outside one is a non-inferior solution, put it into the saverand keep the inside one. Ultimately, the solutions in the saver will be non-inferior than any other one. Suppose that we get p Pareto solutions in the above procedure, all of them will be inherited to the next generation. It is needed to select other N × p chromosomes to be inherited, where k represents the iteration time to vary population size. The selection method is shown here. Firstly, normalize the fitness function fi, then suppose the weight coefficient as πi, thus the multi-objective problem will be simplified as a single-objective problem, denoted as eq. (9):


where and ki represents a random number between 0 and 1.

According to eq. (9), it is suitable to use proportional selection to get the other k × p generation. The probability to be selected of every chromosome is proportional to its fitness value. Because there is possibility that the fitness value of every chromosome could be very close, thus it is difficult to obtain good genes. However, some mathematical operations can be done to adjust the pressure to select. At the beginning of the algorithm, the fitness values should be close enough to generate a more various population, while in the end, the fitness value should differ a lot to accelerate the convergence rate.

The flow chart of self-adaptive GA in this paper is shown in Fig. (1).

Fig. (1).

Flow chart of genetic algorithm.


After GA, there will be many Pareto solutions, different in various objective values. It is much needed here to select an applicable solution by fuzzy decision. In fact, the objective values represent the weights of themselves [27]; therefore, we can estimate the weight coefficient of them by their values as shown in eq. (10):


The triangle membership function is adopted here to do fuzzy description as shown in Fig. (2). So we can get the appropriate solution effectively.

Fig. (2).

Triangle membership function.


This paper tests the algorithm on IEEE-38 bus standard system. The number 30 and 32-38 buses are supposed to install distributed sources. The initial population is 200, iteration times are 30. In the end, about 2000-3000 Pareto solutions could be found in the global Pareto saver. Since there are five kinds of description of 5 objective functions, there are at most different Pareto solutions. But on the other hand, Pareto solutions are not inferior to others, so there are just little inferior solutions. In a word, the solutions we get involve all the possible solutions on the whole. Fig. (3) shows the histogram of solutions of every objective function. From this figure, we can see that most solutions have a relatively small objective value, revealing that the algorithm can find optimal solutions effectively.

A more observable distribution of Pareto solutions is shown in Fig. (4) and Fig. (5), in which we can see that most solutions appear near a smaller objective value.

In the final decision, supposing the fuzzy descriptions of voltage offset, line loss, power from main grid and construction cost are very important, description of operating cost are important, we finally get two solutions. One of them is listed in Table 3, where 1 represents micro gas turbine, 2 represents fuel cell, 3 represents wind power, 4 represents solar energy. From Table 3, we can see that, since the construction cost is described as very important, the solution does not contain the solar energy because of its high cost as shown in Table 1.

Table 3.

Optimal distributed generation power.

Active Power Reactive Power Source Type
8.4145 3.3098 3
7.3735 2.9234 3
7.9205 3.5736 3
6.4043 3.0914 3
4.7291 2.7641 1
7.6828 1.5924 3
3.4856 4.144 2
7.8149 4.1219 3

When all the DGs’ active and reactive outputs are as shown in Table 3, the average bus voltage is 1.0696. Only two of the bus nodes’ voltage are 1.101 which exceeds the limit of voltage while others are all in the allowable range. The total line loss is 0.548, while is just 1.02% of the generated active power. The power from main grid is -1.8689, suggesting the microgrid is transmitting power to the main grid. From the above, we can see that the microgrid performs efficiently and realizes our original purpose.

In order to make a further analysis, two-objective optimization, line loss and voltage offset, is also tested. The parameters are just the same with the former example. When the algorithm finishes, there are 39 Pareto solutions in all which is largely reduced compared to five-objective optimization. The histogram of these solutions relating to objective values is shown in Fig. (6). From the figure, most solutions have a relatively small objective value as expected.

Distribution of solutions coordinated with the two objectives is shown in Fig. (7). It can be seen that dots in Fig. (7) is similar to the lower part of Fig. (5a), with a smaller objective value.

Fig. (3).

Histograms of solutions of each objective function.

In the final decision, when the description of voltage is very important while the otheris important, we get two different solutions, one of them shown in Table 4.

Table 4.

Optimal distributed generation power of two-objective optimization.

Active Power Reactive Power Source Type
7.5428 3.8379 1
6.1706 -0.4934 1
6.9156 -0.5151 4
4.7692 2.2291 1
8.4077 3.325 2
6.1996 -0.7876 2
6.4466 3.5579 4
9.6714 4.4239 4

When all DGs’ active and reactive outputs are set as in Table 4, the voltage offset is 1.016 on average and all the bus voltages are in the allowable range. The largest deviation is 1.0499, nearly half of the allowed voltage offset range. The line loss is 0.7975, account for 1.42% of the total active power. It is slightly bigger than that of five-objective optimization because the description of line loss is different, while the voltage offset is much smaller because two-objective optimization will surely get a better result compared with five-objective problem.

Fig. (4).

Three-dimension distribution of pareto solutions based on different objectives.

In addition, in the fuzzy decision of two-objective optimization, there are nearly 5-10 different solutions, which is difficult to choose. To determine how to choose the optimal solution, there are two ways can be considered. One is that we can make more detailed descriptions in fuzzy decision, so the interval of fuzzy description will narrow down and resulting in fewer solutions. The other is to introduce niche genetic algorithm to evenly distribute Pareto solutions. Of course, the second method will slow down the algorithm’s speed. In large system, the first method is recommended. In conclusion, we can see that the algorithm can generate appropriate solutions efficiently.

The proposed Self-adaptive GA is compared with PSO algorithm in terms of optimization results, as shown in Table 5. It can be concluded that the proposed self-adaptive GA is better than PSO for the reduction of power loss and voltage improvement. The initial iterations of both algorithms are set to be 100, and both of them converge in about 50-60 iterations. With the nearly equivalent convergence speed, the proposed GA can achieve a better optimized solution which verifies its performance.

Fig. (5).

Two-dimension distribution of pareto solutions based on different objectives.

Fig. (6).

Histogram of solutions of two objective functions.

Fig. (7).

Two-dimension distribution of pareto solutions based on different objectives of two-objective optimization.

Table 5.

Comparison between the proposed self-adaptive algorithm and PSO algorithm.

Losses before Optimization (*100kW) Losses after Optimization (*100W) Loss Improvement (%)
Self-adaptive GA 4.22 2.38 43.6
PSO 4.22 2.76 34.6
Voltage offset before optimization (volt) Voltage offset after optimization (volt) Voltage offset improvement (%)
Self-adaptive GA 0.0855 0.0696 18.6
PSO 0.0855 0.0741 13.3


This paper mainly discusses the optimal operating strategy of DGsin microgrid. Five-objective functions are established and self-adaptive GA and fuzzy decision are applied to solve the optimization problem. Considering self-adaptive mechanisms, our proposed GA algorithm significantly improve the speed and effects of optimization. The calculation results indicate that this algorithm can find an appropriate solution for DGs’ power quickly and effectively with a tremendous progress in line loss, voltage offset and costs both, which are highly appreciated in real-time control system such as EMS and MAS.

In future work, network reconfiguration will be considered in real-time control and optimization. Also, more kinds of DG will be taken into account such as large capacity battery with both load and generator modes. A further study of parameters of the algorithm will be made to improve the performance and convergence rate, especially to avoid solutions with same fuzzy descriptions. Moreover, as to objectives, transmission balance will be added and against the problem of exceeding voltage, some reactive power optimization algorithm will beapplied to work coordinately with GA so as to improve the microgrid’s performance on the whole.


The authors confirm that this article content has no conflict of interest.


This work is supported by Science and Technology Project of the China Southern Power Grid Company: The research on the system of intelligent access small distributed power and local control (K-GD2014-0959).


[1] El-Khattam W, Salama MM. Distributed generation technologies, definitions and benefits. Electr Power Syst Res 2004; 71: 119-28.
[2] Meena RS, Kumar Y. A comparative analysis of sizing and siting of distributed generation using evolutionary techniques. Int J Electr Electron Comput Eng 2014; 3: 73-9.
[3] Zhang J, Ai Q, Wang X. Application of Multi-agent System in a Microgrid. Dianli Xitong Zidonghua 2008; 24: 80-2.
[4] Lei T, Ai Q, Xie D. Development of application of modern EMS in smart grid. China Elect Power 2010; 9: 1343-9.
[5] Aunedi M, Škrlec D, Štrbac G. Optimizing the operation of distributed generation in market environment using genetic algorithms In: IEEE MELECON 2008 Proceedings. 2008; pp. 780-5.
[6] Sharma P, Agarwal P. Optimization of operational energy cost in a hybrid distributed generation system In: IEEE Region 10 and the Third International Conference on Industrial and Information Systems. 2008; pp. 1-6.
[7] Ugranli F, Karatepe E. Genetic algorithm for weight assignment in optimum planning of multiple distributed generations to minimize energy losses In: International Symposium on Innovations in Intelligent Systems and Applications (INISTA). 2012; pp. 1-6.
[8] El Hage FH, Kagan N. An evolutionary algorithm for the optimisation of the distributed generation dispatch In: 18th International Conference and Exhibition on Electricity Distribution. 2005; pp. 1-4.
[9] Gu C, Ai Q. The optimal layout of distributed generation in distribution system. J Shanghai Jiaotong Univ 2007; 11: 1896-900.
[10] Aliabadi MH, Behbahani B, Jalilvand A. A combination of GA and OPF for allocation and active and reactive power optimization in distributed generation units In: IEEE International Power and Energy Conference. 2008; pp. 1541-4.
[11] Jamian JJ, Mustafa MW, Mokhlis H, Abdullah MN. Comparative study on distributed generator sizing using three types of particle swarm optimization In: International Conference on Intelligent Systems, Modeling and Simulation. 2012; pp. 131-6.
[12] Pandi VR, Zeineldin HH, Xiao W. Determining optimal location and size of distributed generation resources considering harmonic and protection coordination limits. IEEE Trans Power Syst 2012; 28: 1245-54.
[13] Mistry K, Bhavsar V, Roy R. GSA based optimal capacity and location determination of distributed generation in radial distribution system for loss minimization In: 2012 11th International Conference on Environment and Electrical Engineering. 2012; pp. 513-8.
[14] Hussain I, Roy AK. Optimal size and location of distributed generations using differential evolution (DE) In: 2nd National Conference on Computational Intelligence and Signal Processing. 2012; pp. 57-61.
[15] Moradi M H. A combination of genetic algorithm and particle swarm optimization for optimal DG location and sizing in distribution systems. In: 2010 Conference Proceedings on IPEC. 2010; pp. 858-62.
[16] Zareiegovar G, Fesaghandis RR, Azad MJ. Optimal DG location and sizing in distribution system to minimize losses, improve voltage stability, and voltage profile In: 2012 Proceedings of 17th Conference on Electrical Power Distribution Networks. 2012; pp. 1-6.
[17] Ahmadigorji M, Kenari MT, Mehrasa M. Optimal DG sizing in primary distribution feeders using dynamic programming approach In: 2012 11th International Conference on Environment and Electrical Engineering. 2012; pp. 371-5.
[18] Anwar A, Pota HR. Optimum allocation and sizing of DG unit for efficiency enhancement of distribution system In: IEEE International Power Engineering and Optimization Conference. 2012; pp. 165-70.
[19] Mohammadi MT, Arab Y, Faramarzi M. PSO algorithm for sitting and sizing of distributed generation to improve voltage profile and decreasing power losses In: 2012 Proceedings of 17th Conference on Electrical Power Distribution Networks. 2012; pp. 1-5.
[20] Paliwal P, Patidar NP, Nema RK. A comprehensive survey of optimization techniques used for distributed generator siting and sizing. In: Southeastcon Proceeding IEEE. 2012; pp. 1-7.
[21] Tiwari S, Kumar Rao M. Reduction of unwanted rules by genetic algorithm using distance weight vector. J Res Electr Electron Eng 2014; 3: 52-6.
[22] Guo P, Wang X, Han Y. The enhanced genetic algorithms for the optimization design In: International Conference on Biomedical Engineering and Informatics. 2010; pp. 2990-4.
[23] Qian K, Yuan Y, Shi X, Zhou C, Ju P. Environmental Benefits Analysis of Distributed Generation. In: Proceedings of the CSEE. 2008; 28: pp. 11-5.
[24] Wang M, Ding M. Distributed generation and its benefits. J Hefei Univ Technol 2004; 27: 354-8. [Natural Science].
[25] Shun K. Environmental cost analysis and research of different power plants. Energy Eng 2004; 3: 23-6.
[26] Deb K, Agrawal S, Pratap A. A fast elitist non-dominated sorting genetic algorithm for multi-objective optimization: NSGA-II In: Parallel Problem Solving from Nature Vl. Germany: Springer Berlin Heidleberg 2000; pp. 849-58.
[27] Guan Z, Kou J, Li M. An evolutionary multi-objective optimization algorithm based on fuzzy preferences. Tianjin Daxue Xuebao 2002; 3: 275-80.