Implementation and Comparison of Particle Swarm Optimization and Genetic Algorithm Techniques in Combined Economic Emission Dispatch of an Independent Power Plant

This paper presents the optimization of fuel cost, emission of NOX, COX, and SOX gases caused by the generators in a thermal power plant using penalty factor approach. Practical constraints such as generator limits and power balance were considered. Two contemporary metaheuristic techniques, particle swarm optimization (PSO) and genetic algorithm (GA), have were simultaneously implemented for combined economic emission dispatch (CEED) of an independent power plant (IPP) situated in Pakistan for different load demands. The results are of great significance as the real data of an IPP is used and imply that the performance of PSO is better than that of GA in case of CEED for finding the optimal solution concerning fuel cost, emission, convergence characteristics, and computational time. The novelty of this work is the parallel implementation of PSO and GA techniques in MATLAB environment employed for the same systems. They were then compared in terms of convergence characteristics using 3D plots corresponding to fuel cost and gas emissions. These results are further validated by comparing the performance of both algorithms for CEED on IEEE 30 bus test bed.


Introduction
The primary objective of an independent electric power producer is to generate electricity at the minimum possible cost. The most expensive commodity in a thermal power plant is the fuel used for the generators to produce electricity. Hence, the focus is on minimizing the production cost; which can be achieved by dispatching the committed generators in the most economical way possible without violating the generators and system electrical constraints and ratings. Moreover, environmental regulatory authorities also impose certain limits on all gas emission sources because of the alarming situation of pollution in the past few decades of many regions around the world [1]. Therefore, a simultaneous minimization of both fuel cost and emission is the obvious way to address those challenges; hence, the idea of a combined economic emission dispatch (CEED) emerged.

57
Many modern artificial intelligence (AI) techniques based on the theory of Darwinian evolution 58 of biological organisms, e.g., genetic algorithm (GA), and social behaviors of species, e.g., particle 59 swarm optimization (PSO), have been invented. They have been very successful concerning results 60 and regarding dealing with the complexities occurred in formulating such problems. Particle swarm 61 optimization and genetic algorithm are the two leading methods from AI area and are being exploited 62 widely in every discipline including power systems [3][4][5][6]. Their hybrid versions are also reported in 63 the literature [7][8][9], where qualities of both are combined to solve a particular problem. They have 64 also been employed individually on other problems [10,11] where PSO was found to have better performance than that of GA.

66
In recently reported literature, E. Gonçalves et al. solved nonsmooth CEED using a deterministic 67 approach with improved performance and Pareto curves [1]. They included valve point loading effect 68 but the same approach has to be extended considering other constraints like network losses and results via three different cases studied on a six unit test system [13] and can be extended towards 76 distributed generation in microgrids. Many modern artificial intelligence (AI) techniques based on the theory of Darwinian evolution of biological organisms, e.g., genetic algorithm (GA), and social behaviors of species, e.g., particle swarm optimization (PSO), have been invented. They have been very successful concerning results and regarding dealing with the complexities occurred in formulating such problems. Particle swarm optimization and genetic algorithm are the two leading methods from AI area and are being exploited widely in every discipline including power systems [3][4][5][6]. Their hybrid versions are also reported in the literature [7][8][9], where qualities of both are combined to solve a particular problem. They have also been employed individually on other problems [10,11] where PSO was found to have better performance than that of GA.
In recently reported literature, E. Gonçalves et al. solved nonsmooth CEED using a deterministic approach with improved performance and Pareto curves [1]. They included valve point loading effect but the same approach has to be extended considering other constraints like network losses and prohibited operating zones. H. Liang et al. tackled the multiobjective combined dispatch by developing a hybrid and improved version of bat algorithm [12] and implemented on large scale systems considering power flow constraints. The conducted dispatch was static based on conventional energy resources. B. Lokeshgupta et al. proposed a combined model of multiobjective dynamic economic and emission dispatch (MODEED) and demand side management (DSM) technique using multiobjective particle swarm optimization (MOPSO) algorithm and validated their results via three different cases studied on a six unit test system [13] and can be extended towards distributed generation in microgrids.
In reported literature [14][15][16], in most cases, only one technique has been used to solve CEED on IEEE test cases, and their results have been compared with previous work. In Table 1, the survey of [17] is summarized to conclude that GA is better for low-power systems while PSO outperforms in the case of high-power systems. However, what happens when these two leading metaheuristic techniques are employed together to the same system? This work deals with this novel idea, hence, both PSO and GA will be implemented individually on CEED of an independent power plant (IPP) situated in Pakistan considering all gases (NO X , CO X , and SO X ) for various load demands. The results will be of great importance as the data of an actual IPP will be utilized and they will also grade the performance of PSO and GA for CEED of an IPP. In order to validate the results, a conventional IEEE 30 bus system is also considered. This work will contribute the results of combined dispatch of fuel and gas emissions (economic and environmental aspects, respectively) carried out on a power plant with two leading algorithms (PSO and GA) using MATLAB and then comparing their performance in terms of better solution, convergence characteristics (3D plots), and computation time. The implementation, comparison, and convergence characteristics of PSO and GA employed for the same systems are the main contribution of this work to the field. These characteristics were compared with each other with 3D plots to analyze the better solution yielded by the two algorithms applied for CEED of the same systems in MATLAB environment.

Problem Formulation
CEED comprises two objective functions (cost and emission) that are to be minimized. The fuel cost and emission of a generator can be represented as a quadratic function of the generator's real power [18]. Hence, for N running generators in a plant, the total fuel cost (FC) and emission of a single gas (E g ), respectively, are given in Equations (1) and (2).
where a i , b i , and c i are cost coefficients; α i , β i , and γ i are emission coefficients of unit i out of N generators. They are computed by the following: • Getting the heat rate curves and emission reports of operational generators from the plant.

•
Then, calculating and arranging their fuel costs and emissions corresponding to their active powers in tabular form.

•
Applying the quadratic curve fitting technique on these data points to get cost and emission coefficients.
This multiobjective optimization problem is converted to a single objective function of total cost (TC) by imposing a penalty (h g ) on the emission of G gases to convert them into emission cost (EC).
There are different types of penalty factors; their benefits and drawbacks are thoroughly discussed in [19]. The min-max penalty factor of Equation (4) is used in this work because of its superiority reported in [19] over the others.
where h i for each generator for every gas is calculated and all are sorted in ascending order, then starting from the smallest h i , P i,max of corresponding generator is added until P i,max ≥ P D , the h i at this stage is selected as penalty factor h g of that gas for the given load demand. For achieving this optimization, the N generators will be dispatched with various combinations of output powers but each combination must conform to two mandatory constraints. First of all, no unit should violate its limits for producing output power (P i ), and secondly the total generation (P G ) should meet the load demand (P D ) and transmission line losses (P L ) [18].
The generator limits constraint is satisfied by initializing each unit's power within prescribed limits and then constantly checking the violation. If a unit crosses its limit, then its output is set to that limit. The second power balance constraint is accounted for by letting algorithm to find optimal powers for N − 1 generators and setting the power (P N ) of last generator N also called slack generator to: If losses are ignored, then the power of slack generator will reduce to:

Implementation of PSO to CEED
J. Kennedy and R. Eberhart proposed this method in 1995 after observing and modeling the social interaction within bird flocks and fish schools for searching food [20]. The particles in such swarms move to attain optimal objective (food) based on their personal (pbest) and swarm's (gbest) best experiences. Each particle is a valid solution to the problem, and hence, its dimension is that of problem space. The position of each particle keeps on updating by its current velocity, particle's best position, and swarm's best position until the optimal solution is discovered. The velocity and position of the particle is given by Equations (9) and (10).
where j is particle counter, k is iteration counter, c 1 and c 2 are acceleration coefficients, r 1 and r 2 are random numbers in the range of 0-1, pbest j is the best position of particle based on its personal knowledge, gbest is the best position of particle based on group knowledge, and µ is the inertia weight given by Equation (11).
The performance of classical PSO has been made a lot better by working on its various parameters and by using different search strategies for updating the particle's position [18]. Hence, different variants of PSO has been introduced, such as WIPSO and TVAC-PSO, in which inertia weight µ is improved and acceleration coefficients c 1 and c 2 are timely varied [21], MRPSO [22] in which particle's position is changed by using moderate random and chaotic search techniques, respectively. It has been observed that the most straightforward and efficient way of making classical PSO more effective is to use the constriction factor approach (CFA) [23], in which particle's velocity (9) is multiplied by a parameter called constriction factor (CF) given by Equation (12).
where ϕ = c 1 + c 2 and ϕ > 4. The PSO algorithm for CEED, with corresponding flowchart in Figure 2, is implemented in the following steps: 1. Input values of fuel coefficients, generators limits, emission coefficients, load demand, maximum iterations, number of particles, acceleration coefficients, and inertia weight's maxima-minima.

2.
Randomly initialize power outputs (position) of N − 1 generators within their limits and change in these powers (velocity) for all particles. 3.
Calculate the power of slack generator from Equation (8) to meet the power balance condition of Equation (6). P N should also be within its unit's limits. If any unit out of N surpasses its boundary at any stage throughout the algorithm, it is set to the limit which it has broken. 4.
Initialize pbest and gbest to infinity and find penalty factors of all considered gases. 5.
Find fuel cost FC, emission of gases E g , emission cost EC with total cost TC for all particles from Equations (1)-(3), respectively. 6.
Update pbest of each particle with its total cost if former is greater than latter. The minimum pbest out of all particles is stored as gbest if its present value is smaller than its previous value. The generators' powers corresponding to pbest and gbest are stored in separate matrices and are also modified on every update. 7.
Calculate inertia weight from Equation (11), find new velocities and positions of N-1 generators for all particles form Equations (9) and (10), and keep them within units' limits in case of violation. 8.
For slack generator N, calculate its power from Equation (8) and this should also be in limits.
If violation is done, set this power to the limit crossed and start changing the output from first generator until Equations (5) and (6) are satisfied. 9.
If algorithm is converged, continue to next step, go to step 5 otherwise.
10. Print neatly the results of optimal solution (gbest) including powers of all generators, line losses, fuel cost, emission of gases, penalty factors, emission cost, and total cost for the given load demand.

Implementation of GA to CEED
D.E. Goldberg gave the basic theory for design and analysis of genetic algorithms based on the concept of biological evolution in 1988-1989 [24], and later, J.H. Holland established it systematically as a fact. In genetic algorithms, the problem variables (output powers) are coded into binary strings. Each string is a valid solution to the problem and hence its length should be comparable to the problem space (number of generators N). The bits reserved logically for single generator's power (genbits) in a string is given in Equation (13).
The length of the binary string (strlen) will be N × genbits. Each individual (string) has a fitness value in the range 0-1 which basically relates that individual to the one having maximum fitness in that population. The fitness function should be linked to the objective under discussion contrary to the constraints of the objective function which should be dealt by external checks. Considering this fact and the remarkable communication within the group by PSO parameters pbest and gbest, a new fitness function different from the one reported in [3] and [5] for jth individual out of P individuals is given by (14).
The initial population is randomly generated, keeping in view the generators' limits but the next generations are produced by selection, crossover, and mutation performed on the present one (powers corresponding to pbest). Selection is basically making a mating pool of fitter strings from present population based on the natural principle of "survival of the fittest." It is usually done by the concept of roulette-wheel. No new string is formed in selection phase. The greater the fitness of a string, the greater portion of the wheel's circumference it will occupy and the greater chance it will get to copy into mating pool. The wheel is spun P times to select a population of good parents for producing off springs by crossover and mutation.
Crossover is performed on two parents of selected population to produce two off springs. There are three types of crossover: one point, multi-point, and uniform, explained in Table 2. Crossover site is selected randomly and the probability of crossover (p c ) is usually taken higher. In this work, one point crossover is performed on selected strings of mating pool. Finally, mutation is performed on the children produced after crossover which is just flipping of the child's bit at mutation site selected randomly. Its probability (p m ) is usually taken lower, e.g., if child is (11 11 11 11) and mutation site is 4, then the mutated child will be (11 10 11 11). This journey of producing next generations continues until the optimum solution is found.
The GA algorithm for CEED, with corresponding flowchart in Figure 3, is implemented in the following steps:

1.
Input values of fuel coefficients, generators limits, emission coefficients, load demand, maximum iterations, number of individuals, genbits from Equation (13), strlen, p c , and p m .

2.
Randomly initialize power outputs of N−1 generators within their limits for all individuals.

3.
Calculate the power of slack generator from Equation (8) to meet power balance condition of Equation (6). P N should also be within its unit's limits. If any unit out of N surpasses its boundary at any stage throughout the algorithm, it is set to the limit which it has broken. 4.
Initialize pbest and gbest to infinity and find penalty factors of all considered gases. 5.
Find fuel cost FC, emission of gases E g , emission cost EC with total cost TC for all particles from Equations (1)-(3), respectively. 6.
Update pbest of each individual with its total cost if former is greater than latter. The minimum pbest out of all particles is stored as gbest if its present value is smaller than its previous value. The generators' powers corresponding to pbest and gbest are stored in separate matrices and are also modified on every update. 7.
Calculate fitness function for all individuals from Equation (14). Code the output powers to binary strings, perform the three genetic operators (selection, crossover, and mutation), and again decode them to output powers. 8.
Keep all outputs within units' limits in case of violation. For slack generator N, calculate its power from Equation (8), and this should also be in limits. If violation is done, set this power to the limit crossed and start changing the output from first generator until Equations (5) and (6) are satisfied. 9.
If algorithm is converged, continue to next step, go to step 5 otherwise. 10. Print neatly the results of optimal solution (gbest) including powers of all generators, line losses, fuel cost, emission of gases, penalty factors, emission cost, and total cost for the given load demand.

Simulation Results
Combined economic emission dispatch using PSO and GA for 500 iterations were implemented on MATLAB on six generators of IEEE 30 bus system and eight committed units (gas turbines) of an IPP in Pakistan for load demands of 1500 and 2000 MW, and 500 and 700 MW, respectively. The initial parameters set in both algorithms were: The solutions with average operating time (t) were selected out of 50 trials for comparison between PSO and GA.

IEEE 30 Bus System
The data for fuel cost and emission coefficients were taken from [5]. Transmission line losses were not accounted for while all three gases (NO X , CO X, and SO X ) were considered; their penalty factors were calculated using Equation (4)            The data calculated and used for the dispatch of all units is given in Appendix. Transmission 10 line losses were ignored because IPP's main concern is generation capacity which they have to 11 produce and supply to national grid, and SOX gas were not accounted for because of the

Pakistani IPP
This thermal power plant comprises of 15 generating units out of which 10 are multi-fuel-fired gas turbines and remaining five are steam turbines with an overall capacity of 1600 MW. The combined dispatch was performed on eight gas turbines as the remaining two are uneconomical and mostly turned off. Steam turbines take exhaust of gas turbines to operate, hence they were not considered as they do not take any direct fuel.
The data calculated and used for the dispatch of all units is given in Appendix A. Transmission line losses were ignored because IPP's main concern is generation capacity which they have to produce and supply to national grid, and SO X gas were not accounted for because of the unavailability of sufficient data. Remaining two gases (NO X and CO X ) were considered; their penalty factors were calculated using Equation (4) and the procedure following this equation, for load demands of 500 and 700 MW given as: The results are summarized in Table 4 (all powers are in MW, emissions in mg/Nm 3 , costs in 10 3 $/h, and time in seconds) while the convergence characteristics of both algorithms, with respect to both objectives (fuel cost and emission) for P D = 500 MW and P D = 700 MW, are shown in Figures 6  and 7, respectively.

Results Discussion
In Table 3, the power output of all six generators was presented as the sum of which is equal to 31 the load demand (1500 and 2000 MW) for both algorithms (PSO and GA). Then, the emissions of all 32 three gases (NOX, COX, SOX) from these generators were calculated and added (E) to convert into cost is added to the emission cost to achieve total cost (TC) of the combined dispatch. In the end, the given 35 time (t) represents the computational time of the algorithm for that particular load demand and PSO 36 produces the optimal solution 4 times quicker than that of GA for both load demands. Figure 4 shows 37 the 3D plot of fuel cost and emission with regard to iterations for 1500 MW. It shows that PSO starts 38 with lower fuel cost and emission, and converges quickly on the optimal solution as compared to GA 39 which starts with higher fuel cost and emission and takes some time to converge. Figure 5 shows the  Table 4 gives the output power of eight gas-fired generators and this total generation is equal to

30
In Table 3, the power output of all six generators was presented as the sum of which is equal to 43 Table 4 gives the output power of eight gas-fired generators and this total generation is equal to

Results Discussion
In Table 3, the power output of all six generators was presented as the sum of which is equal to the load demand (1500 and 2000 MW) for both algorithms (PSO and GA). Then, the emissions of all three gases (NO X , CO X , SO X ) from these generators were calculated and added (E) to convert into cost (EC) using penalty factor approach. The fuel cost (FC) is calculated from the generators' powers and is added to the emission cost to achieve total cost (TC) of the combined dispatch. In the end, the given time (t) represents the computational time of the algorithm for that particular load demand and PSO produces the optimal solution 4 times quicker than that of GA for both load demands. Figure 4 shows the 3D plot of fuel cost and emission with regard to iterations for 1500 MW. It shows that PSO starts with lower fuel cost and emission, and converges quickly on the optimal solution as compared to GA which starts with higher fuel cost and emission and takes some time to converge. Figure 5 shows the similar 3D plot but for a load demand of 2000 MW in which PSO gets lost for a small time period in non-optimized region but quickly converges on the solution with lower fuel cost and emission, while GA converges in steps on to a solution which is not better than PSO. Table 4 gives the output power of eight gas-fired generators and this total generation is equal to the load demand (500 and 700 MW) for both cases (PSO and GA). From the generators' powers, the fuel cost (FC) and emission of two gases (NO X and CO X ) were calculated using quadratic relation of generator's output to fuel cost and emission, respectively. The emission was then totaled (E) and converted to cost (EC) by imposing penalty factor. These two costs (related to fuel and emission) were then added to get total cost (TC) of the combined dispatch of the power plant. In the end, t is the time taken by each algorithm to carry out the dispatch for a particular load demand. It is noteworthy that PSO is 4-7 times faster than its GA counterpart for both load demands. Figure 6 shows the 3D plot of fuel cost and emission with regard to iterations for 500 MW. In this figure, PSO starts with higher fuel cost but in few iteration, it converges on the optimal solution while GA remains stuck in non-optimized region. Figure 7 shows the similar 3D plot but for a load demand of 700 MW. In this simulation, both PSO and GA starts from nearby solutions, but then, PSO converges very quickly while GA struggles up to 300 iterations and then converges to a nearer solution of PSO, but still, this solution is not better than the one provided by PSO.

Conclusions
The combined dispatch of plant generators with respect to fuel and gas emissions was carried out using PSO and GA in MATLAB. The results demonstrate that PSO outperforms GA for the combined dispatch in terms of achieving lower fuel cost, lower emission, fast convergence, and lesser simulation time. This was validated for both IEEE 30 bus system and for an independent power plant with simulation, 3D plots, and thorough discussion. The work has successfully implemented PSO and GA algorithms for CEED of the same systems. The simulation results are compared and tabulated for different load demands. 3D plots were discussed to highlight the convergence characteristics of PSO and GA with respect to fuel cost and gas emissions. In future studies, the combined dispatch will be made more realistic, by including some other practical constraints like valve point loading, ramp rate limits, prohibited operating zones of generators, transmission line losses etc. The algorithms, PSO and GA, can be made more efficient by studying and improving their performance parameters.

Acknowledgments:
The publication charges of this article were funded by Qatar National Library (QNL), Doha, Qatar.

Conflicts of Interest:
The authors declare no conflict of interest.