Improvement of the PSO Algorithm to Solve the Nonlinear Economic Dispatch Problem with a New Local Search Algorithm

This paper suggests a new PSOHHC algorithm for solving the economic dispatch (ED). This algorithm was created by integrating two algorithms: PSO (particle swarm optimization) algorithm, an evolutionary algorithm based on collective intelligence, and a new search algorithm for HHC (Hybrid Hill Climbing) which is based on searching. The aim of presenting this algorithm is to improve the performance of the PSO algorithm in terms of convergence to achieve the best possible solution with the required accuracy. This new algorithm is able to improve the responses obtained from the PSO algorithm with a controllable local search. The most important goal of economic dispatch is the optimal allocation of each generator's contribution to provide the load and reduce the costs of active units in the power system. This is generally due to the nonlinear factors and limitations, such as: the effect of steam inlet valve (valve point effect (VPE)), the balance between the production and consumption of the system, the prohibited operating zones (POZS), production limits, slope rate, and lines’ losses. This algorithm is implemented on 3 test systems of 13 units, 31 units and 40 units with different operating conditions, independently and also in combination with the PSO evolutionary algorithm, and simulation results illustrate the efficiency of this algorithm in solving ED problems.


Introduction
The purpose of solving the problem of economic dispatch in the power system is to program the output of the production units in such a way that the required load demand of power system is provided at the lowest possible cost. For this, all the equal or unequal constraints of the power system must be fulfilled. These constraints include the active power limitation of production units, effects of the steam valve, prohibited zones and transmission losses [1].
By increasing fuel costs and rebuilding power grids, the economic dispatch problem has become more important. This is a nonlinear optimization problem in which the optimal production of each unit is determined in such a way that the objective function of the system, which is the same as the fuel cost function, is minimized.
By adding a sinus term to a quadratic cost function and considering the effect of the input valve, the cost function of the production units will have nonlinear and non-symmetric characteristics. This causes the search space to be complex, unconventional, and discontinuous which in case of having multiple cost functions for generator units, the number of local Minimums becomes very high and exit from local optimizations trap comes up [2].
In recent years, researchers have focused on innovative AI-based techniques, and the classic or traditional methods, such as linear and nonlinear programming, Landa, Gradient, and Newton have very low efficiency for solving the problem of economic dispatch [3].
In reference [4], The Particle Swarm Optimization method (PSO) is expressed. In this method, the production of generator units is considered as particles which according to a specific pattern, move to reduce production costs. In reference [5], the two-phase multiple numerical programming (TPMIP) method is expressed. This method includes two stages. In the first stage, the linearization and numerical programming combination are performed for units that contain VPE and POZs, and in the second stage, the compression operation of the range is applied to the output power. This method is implemented on 13-unit, 15-unit, and 40-unit testing systems with different conditions and its results are compared with other methods. In reference [6], a search-based method called the Differential Search Algorithm (DSA) is expressed for solving the optimal economic dispatch problem which is tested on 9, 30, 57 bus IEEE standard systems. In this paper, the results are compared with other methods such as Tabu Search (TS) [7] and Artificial Bee Colony (ABC) [8] and Differential Evolution algorithm (DE) [9], which demonstrate the convergence and accuracy of the algorithm and also its analysis power in solving nonlinear power systems. In reference [10], the Adaptive Group Search Optimization Algorithm (AGSO) is applied to multi-objective ED problems. This algorithm is tested on the IEEE standard 30 and 15 bus system, and shows the convergence and accuracy of the algorithm response in problems and nonlinear objective functions with the purpose of multi-objective optimization. In reference [11], a search algorithm called the Gravity Search Algorithm (GSA) has been used to solve the optimal multi-objective load dispatch problem which The result of its implementation on the IEEE 30 bus system demonstrates the power of algorithm analysis to minimize the fuel costs, the losses, and total emissions of greenhouse gases. In this algorithm, first, responses from the searchable space are randomly presented and then, the fitness value of the responses is evaluated and this fitness is used as a mass for their corresponding responses. In reference [12], the (C-GRASP-DE) method has been discussed to solve the economic dispatch problem with non-uniform behavior by combining two Continuous Greedy Random Access Search (C-GRASP) [13] and Differential Evolution (DE) algorithms. Other innovative algorithms and methods have been proposed to optimize the load dispatch and also the economic dispatch of power grids. Such as Bat Algorithm (BA) [14] and Black Hole Algorithm (BHA) [15] which they are usually important in the convergence, accuracy, and response rate, and their selection depends on the type of problem and its parameters [16].
In the sequel to the formulation of economic dispatch, the description of the local search proposed HHC algorithm, the application of the HHC algorithm is combined with the PSO algorithm on three test systems and with the capability of local search and the conclusion is presented. This paper suggests a new PSOHHC algorithm for solving the economic dispatch (ED). This algorithm was created by integrating two algorithms: PSO algorithm, an evolutionary algorithm based on collective intelligence, and a new search algorithm for HHC (Hybrid Hill Climbing) that is based on searching. The aim of presenting this algorithm is to improve the performance of the PSO algorithm in terms of convergence to achieve the best possible solution with the required accuracy. This new algorithm is able to improve the responses obtained from the PSO algorithm with a controllable local search.
One of the most important aspects of the innovation of this algorithm is the ability of the algorithm to get out of local optimality. This feature allows the algorithm to get out of all local optimizations and converge to the global optimal solution.

Objective Function
The typical objective function for economic dispatch is minimizing the total costs of generator fuels. Fc function that includes the cost of the power plant and the effect of the steam inlet valve is considered as the following equation: In equation (1), N is the number of system generators, ,min i P is the minimum output of ith fuel generator, the fuel cost of each unit is calculated according to the following equation: Which are the cost factors of ith generator. The sinus term has been added in order to consider steam inlet valve effect [5,17].

Equal and Unequal Constraints
In addition to the effect of the steam inlet valve which included in the objective function, other constraints such as the rate of production change, the prohibited zones, the power balance, and the losses of transmission lines are also considered [18].

Power Balance Equation in Power System
In order to consider the power balance, an equal constraint must be included in the system constraints. Production power should be equal to the total of demand power and losses: In this equation Generator Capacity Limit: The inequality constraint of each production unit capacity is considered as: In which ,max i P is the maximum output of the generator i .

Generator Change Rate Constraints
this constraint, practically limits the online performance of the units and the immediate regulation of the output power, instantly. Therefore, the generator may increase or decrease its production based on the corresponding permissible range. This constraint is expressed as the following for each unit which is the generator production in the previous step's output:

Prohibited Operational Zones Limitation
Due to several factors such as the limitation of the machine components, the steam valve, vibration in the bearing axis and so on, it can be impossible to operate the generators in some areas of the work. This constraint can be expressed as: In this equation,

Introducing the Hybrid Hill Climbing Local Search Algorithm (HHC)
The proposed HHC algorithm is obtained by combining the properties of two algorithms, Iterative Deep Search (IDS) and Hill Climbing (HC) [19]. First, the HC and IDS algorithms are explained briefly and then HHC algorithm will be expressed.
The IDS algorithm is a search-based algorithm which explores search space linearly, to a certain depth in order to find the desired target. In every repetition time of the searching process, the search factor explores to the certain depth of the searching space and in case of not finding the desired target, it expands the depth to reach the desired target or the boundary of allowed search space. This algorithm is a repetition based algorithm. The main problem of this algorithm for being applied in ED problems is that the optimal value of the objective function is not clear before beginning of the search process. Because the purpose of the solving an ED problem is to find the minimum value of the cost objective function on condition of the fulfillment of the constraints. However, in IDS algorithm, the value of the target needs to be cleared at the beginning of the operation. Therefore, this algorithm cannot be used in ED problems [19,20].
In the Hill Climbing algorithm (HC), search factor starts exploration process from a part of the search space to find the peak (extreme point): first, it calculates the value of the objective function in the current point, then with one step forward movement, it obtains the value of the objective function at the new point. If the calculated value is less or equal to the previous value, the search factor is allowed to fix its position at the new point. This process continues until the peak (maximum value of the objective function) is found. The search factor declares that peak has been found if the value of the objective function in one position is greater than the value of the objective function in the previous position and the next position. This type of the implementation of the hill climbing operation is called maximum finder (peak finder) hill climbing algorithm ( max HC ). If the above process is reversed, the factor searches for a point (position) with less than the current value. In this case, it is called minimum finder (hole finder) Hill Climbing ( min HC ). In both cases of hill climbing, the most important challenge is to get caught in the local extreme points and exit from it. Solutions like random restart, throwing the factor into the other parts of the search space is suggested to solve this problem but sometimes due to the loss of the parts of the search space or losing their random nature, they are not reliable and increase the need for the algorithm repetition [21,22]. In the proposed Hybrid Hill Climbing Local Search Algorithm (HHC) all defects have been removed.

Algorithm Description
It is assumed that the problem is to find the minimum value of the objective function. In this algorithm, two search factors, IDS and HC, provide the final answer with their cooperation. First, the hill climber search factor explores the search space systematically to find the first minimum point of objective function. After finding it (which it could be a local extreme), gives it to the IDS auxiliary search factor. This factor starts exploration from the other side of the search space in order to find a value of the objective function which is equal or less than the value that is declared by the min HC search factor. In case of finding this value, it declares the position of the min HC search factor as local extreme. In this case, hill climber search factor changes its behavior from the min HC state to the max HC state and continues exploration process in the search space. This process is being repeated until the exploration of the whole search space and declaration of the global extreme value. Movement step for exploring the search space is determined by the  parameter which in this paper, it is defined as L percent of each range and proposed for the generators production in the power system. max min ( ) 100 The smaller amount of the  , causes the higher accuracy of the algorithm response. The flowchart and the algorithm of the proposed method are as follows: Step1: Receive the problem constraints and objective function and consider a very bad response and put it in the variable "S" Step2: Run the HC Algorithm (For the ED problem, at this step, the search agent starts the local search by running the HC algorithm above the allowed generators power capacity limit. This factor seeks to minimize the value of the fuel cost function of the problem. The first stop point of the search agent will be a local optimal value.) Step3: Is the answer better than " S" response? (If the response of the HC algorithm is less than the initial value of "S", it will replace "S".) Step4: Run the IDS Algorithm to find a better answer and in case of finding it, put it in the variable "S" (For the ED problem, at this step, another search agent starts the search by running the IDS algorithm of the generators power capacity limit. This factor has the task of finding the first values of the generator power, where the value of the problem fuel cost function is less than or equal to the value of "S".) Step5: Has local extremum occurred? (At this step, if the cost function value is found after the IDS algorithm is executed, then the locality of the "S" response to the HC search agent is declared.) Step6: Reverse the HC (At this step, after confirming the locality of the "S" response, the search agent must release itself from the local optimal state. To do this, the process of reversing the HC algorithm progresses and the search agent starts local search within the permitted range of generators to find the maximum value of the ED problem function.) Step7: Print the HC answer (At this step, after repeating the above steps and after completing the search on the ED problem, the final answer is declared as global optimization.) In the following, some methods are presented to increase the convergence rate to the optimal answer. 2. There is no need to determine the random parameters 3. Increasing the accuracy of the problem solving just by determination of one parameter of ρ 4. Systematic searching of the search space and sampling according to a non-random special pattern 5. Possibility of the implementation on the linear and nonlinear objective functions The HHC algorithm is implemented on 3 test systems of 13 units, 31 units and 40 units with different operating conditions, in combination with the PSO evolutionary algorithm, and simulation results illustrate the efficiency of this algorithm in solving ED problems. These results show that the algorithm easily crosses local optimum values and converges to the global optimum. However, the hill climbing algorithm is trapped in the first local optimal value and is not able to get out of it [19].

Fulfillment of the Problem Constraints
In the ED problems, both equal and unequal constraints are usually considered. Since the fulfillment of the equal constraints is impossible during the implementation of the algorithm, these constraints are implicitly considered along with unequal constraints and the best answer is presented. But the final answer is acceptable if the equal constraints are fulfilled. Therefore, a strategy should be used to fulfill the equal constraints of the problem. In this case, two situations can be discussed. The first situation is related to the problems in which no losses are considered in them. In this case, deficit value of the power to fulfill the equal constraints (ee) is as follows: Therefore, in order to compensate this value, it is recommended to add production value, proportional to the x percent, according to the following equation: In which Pi,old is the power production value of each generator which is obtained from the algorithm output and Pi,new is the power production value of each generator in the reformed state for fulfilling the equal constraint, provided that it does not violate the other constraints of the problem.
Second situation is related to the problems which the losses are not considered in them. In this case, considering the dependency of the losses and the production power of the generators, it is recommended to calculate the increment percentage of the x according to the following equation, provided that it does not violate the other constraints of the problem:

Increasing the Algorithm Speed
In order to increase the speed of algorithm convergence to achieve the optimal answer, two strategies are suggested. a) Implantation of two algorithm loads on the problem: in this strategy, at first implantation, with the survey step of search space,   * m   (m is the main survey step of ρ), the range of the optimal answer is found and then it converges to the optimal answer with the main step of ρ in the range of   by the re-execution of the algorithm.
In this case, the convergence speed becomes k m times larger and time complexity of convergence is from the following order: In which, k is the number of problem dimensions, min b) Remove the repetitive searched space: in this strategy, the searched space by a factor is removed from the other factor's search space, it means that the part of the search space which is surveyed by the HC factor is removed from the IDS factor's search space.

Using HHC Algorithm in the Local Search
HHC algorithm can be used as a local searcher to improve the obtained answer of another evolutionary algorithm (for example PSO [4]). For this purpose, first, the PSO algorithm is implemented on the ED problem and then the obtained answers are given to the HHC algorithm as start points. The HHC hill climbing search factor should start searching operation from the desired point to the search space boundaries based on the required accuracy. In this case, two strategies are proposed. First, the local search operation can only be continued until the first better answer is achieved (which in this case HHC search factor does not need IDS search factor).
And secondly, local search operation can be done up to a certain percentage of the allowed range of the search space around the start point (in this paper, search range is considered up to closest boundary of the search space).

Implementation of the HHC Local Search Algorithm on the Economic Dispatch Problem with Combination of the Evolutionary PSO Algorithm in the Standard Test System (PSOHHC)
In order to evaluate the efficiency of the HHC algorithm, 3 IEEE standard test systems are used.
First Test System: includes 13 generator units with considering the valve point loading effect and ignoring the transmission lines losses [5].
Second Test System: includes 15 generator units without considering the valve point loading effect and considering the transmission lines losses and prohibited operation zones [17].
Third Test System: includes 40 generator units with considering the valve point loading effect and ignoring the transmission lines losses [5].
First, each one of the considered test system whit PSO algorithm are analyzed and then the obtained answer is given to HHC to perform the local search around it and improve the results.
The simulation results of the PSOHHC algorithm is compared with other techniques and methods. This comparison shows that, the results of the PSOHHC are certain and the algorithm is run only once to get the right answer and also the accuracy of the optimal answer can be determined by changing the ρ survey step which in this paper, the proposed methods have better and more reliable efficiency. These simulations were performed with matlab2013 software with a 1.6GHz processor system.

First Test System
This test system is made up of 13 generator units by considering the VPE and nonlinear fuel cost function. The purpose of this ED problem is to find generators production comparison so that the lowest fuel cost is applied to the system. Parameters and data of the test system are given in the reference [23] and the required load of the system is 1800 MW. Cost function and the formulation of the problem are given according to the equation (1). In the PSO analysis, the initial population was 80 and the number of iterations was 600 and the learning coefficients were 2. The accuracy of the survey step (L) in the HHC section for this test system is set to 0.05. Therefore, according to equation (8), the survey step (  ) for the largest problem constraint (ie, for the largest generator output capacity range of ED problem) corresponding to the first generator is: To increase the convergence speed and decrease the computation, according to equation (14), m = 3 was considered. Thus, the total number of computations and time complexity was reduced by 1594323 until the best solution was obtained. The obtained results to the optimal value of the cost function and comparison with the existing methods are given in table 1. Also the production power of each generator unit is given in table 2, and convergence curve of the diagram is given in figure 1.  1. Convergence of the algorithm to reach the best answer in the allowed range of the search space for test system 1 As it is clear in figure 1 and also explained in section 3-3, the algorithm after finding the best answer, compensates the difference value between demand power D P and total of the production power

Second Test System
This test system is made up of 15 generator units by considering the lines losses and nonlinear fuel cost function and prohibited zones and ignoring the VPE. In this ED problem, the purpose is to find the lowest value of the fuel cost function of the generators which is expressed in equation 1. Data and parameters of this test system are given in reference [4]. The demand load of the system is 2630 MW. In the PSO analysis, the initial population was 80 and the number of iterations was 600 and the learning coefficients were 2. The accuracy of the survey step (L) in the HHC section for this test system is set to 0.01. Therefore, according to equation (8), the survey step (  ) for the largest problem constraint (ie, for the largest generator output capacity range of ED problem) corresponding to the seventh generator is: To increase the convergence speed and decrease the computation, according to equation (14) , m = 3 was considered. Thus, the total number of computations and time complexity was reduced by 14348907 until the best solution was obtained.
The obtained results of the optimal value of the cost function and its comparison with the other existing methods are given in table 3. Also the value of the proposed production power for each unit is given in table 4 and convergence curve of the diagram is given in figure 3.   As it is clear in figure 3 and also explained in section 3-3, the algorithm after finding the best answer, compensates the difference value between demand power D P and total of the production power

Third Test System
This test system is made up of 40 generators with consideration of VPE and the nonlinear fuel cost function. In this ED problem, the goal is to find the lowest value of the previous fuel cost function of the generators like two previous test systems which has been expressed in equation 1. Data and parameters of this system is given in reference [5]. The demand load of the system is 10500 MW.
In the PSO analysis, the initial population was 85 and the number of iterations was 300 and the learning coefficients were 2. The accuracy of the survey step (L) in the HHC section for this test system is set to 0.001. Therefore, according to equation (8), the survey step (  ) for the largest problem constraint (ie, for the largest generator output capacity range of ED problem) corresponding to the thirteenth to seventeenth generators is: To increase the convergence speed and decrease the computation, according to equation (14), m = 3 was considered. Thus, the total number of computations and time complexity was reduced by approximately 12*10^18 until the best solution was obtained. Obtained results of the optimal value of the cost function is given in table 5. Also, the proposed production power value of each generator unit in this system is given in table 6 and convergence curve of the diagram is given in figure 5. 78 Improvement of the PSO Algorithm to Solve the Nonlinear Economic Dispatch Problem with a New Local Search Algorithm Figure 5. Convergence of the algorithm to reach the best answer in the allowed range of the search space for test system 3 As it is clear in figure 5 and also explained in section 3-3, the algorithm after finding the best answer, compensates the difference value between demand power D P and total of the production power

Conclusions
In this paper, a new PSOHHC algorithm was proposed to improve the nonlinear economic dispatch problem solving. This algorithm, with its exclusive local search capability, can improve the response obtained from the PSO algorithm. In order to make the ED problem's situation more practical, nonlinear factors and limitations such as: the effect of steam inlet valve (valve point effect (VPE)), the balance between the production and consumption of the system, the Prohibited Operating Zones (Pozs), and production limits, slope rate, and lines losses were considered. This algorithm with its unique local search capability can improve the obtained answers in the ED problem. In order to increase the efficiency of the proposed algorithm, some methods were presented to increase the convergence speed, and the complexity of the calculation was analytically evaluated in each case. Another advantage of the proposed method compared to the other existing methods in the articles, is its certain results and one-time algorithm implementation. Also, the accuracy of the optimal answer can be determined by changing the ρ parameter which in this case, has better efficiency and is more reliable than other mentioned methods in the references. Evaluations for the different standard test networks and comparing results with the existing algorithms approved the capability of the proposed algorithm to find better response.