An Enhanced Quantum-Behaved Particle Swarm Algorithm for Reactive Power Optimization considering Distributed Generation Penetration

This paper puts forward a novel particle swarm optimization algorithm with quantum behavior (QPSO) to solve reactive power optimization in power system with distributed generation. Moreover, differential evolution (DE) operators are applied to enhance the algorithm (DQPSO). This paper focuses on the minimization of active power loss, respectively, and uses QPSO and DQPSO to determine terminal voltage of generators, and ratio of transformers, switching group number of capacitors to achieve optimal reactive power flow.The proposed algorithms are validated through three IEEE standard examples. Comparing the results obtained from QPSO and DQPSO with those obtained from PSO, we find that our algorithms are more likely to get the global optimal solution and have a better convergence.What ismore,DQPSO is better thanQPSO. Furthermore, with the integration of distributed generation, active power loss has decreased significantly. Specifically, PV distributed generations can suppress voltage fluctuation better than PQ distributed generations.


Introduction
In power system, reactive power optimization scheduling can reduce active power loss and control voltage level.Common control methods include adjusting the terminal voltage of generators and the tap positions of on-load voltage regulating transformers as well as switching group number of shunt capacitors, and so forth.From mathematical perspective, reactive power optimization in power system is a nonlinear mixed integer programming problem with multiple variables and multiple constraints.Here, the terminal voltage of generator is continuous variable, and tap position of on-load voltage regulating transformer and the number of sets of shunt capacitor are discrete variable.So, it is difficult to solve the problem using traditional mathematical programming methods.
With the development of artificial intelligence technology, a large number of evolutionary optimization algorithms are used to solve reactive power optimization, for example, genetic algorithm [1][2][3], particle swarm optimization algorithm (PSO), seeker optimization algorithm [4], clustering optimization algorithm [5], and so forth.Papers [1][2][3] all used improved genetic algorithm.Zeng et al. [1] proposed an improved genetic algorithm.When considering slow convergence and premature convergence of the original genetic algorithm, they made an improvement on decoding method, genetic operators, crossover and mutation probability, and iteration stopping criterion based on the theory of Catastrophism. Lee et al. [2] and Liao [3] proposed quantum genetic algorithm.It has a good combination of global search ability of quantum and local search capability of genetic algorithm, which can find the optimal solution more quickly and exactly.Tehzeeb-Ul-Hassan et al. [6] proposed fully informed particle swarm optimization (FIPS).The difference from PSO is that, in FIPS, a particle gets the information from all its neighbors rather than just from the best one.In addition, many researchers have proposed many hybrid algorithms [7][8][9][10][11][12], such as chaotic PSO, differential PSO, and fuzzy adaptive PSO.Hybrid algorithm inherits good characteristics of original algorithm.At the same time, it combines advantages of other algorithms, which can find the optimal solution faster and more accurate.He et al. [7] proposed a chaos method which is used in population initialization of particle swarm optimization.While maintaining the randomness of original initial population, diversity is also increased.Ali and Raahemifar [8] proposed a hybrid particle swarm optimization algorithm which integrates differential algorithm with particle swarm optimization algorithm.The introduction of differential algorithm has improved the local search ability of particle swarm algorithm.
At present, most countries mainly supply power centrally.However, the distance of centralized power supply is long, and it is vulnerable to external influence.Long distance power supply will make active power loss increase, which will lead to the increase of transmission cost.Also, long distance power supply is susceptible to man-made interference or natural disasters, which may cause the collapse of the power system seriously.In addition, owing to shortage of fossil fuel and aggravation of environmental pollution, people have to consider using new sources.In recent years, with the mature of new energy technology, distributed generation (DG) develops rapidly.
Currently, many scholars have carried out extensive research on the effect that DGs have made on power grid.Some make research on the effect that single type distributed power supply makes on power system.Liao [13] proposed quantum chaos genetic algorithm to solve the economic dispatch problem containing wind farms and made discussions about the effect on total cost brought by the access of wind farm.The majority analyze the access of variety of DGs [14][15][16][17][18][19][20].In papers [14][15][16], the authors provide different methods to determine the optimal size and location of multiple DGs.In addition, it is common that multiple DGs are accessed under multiple power models and multiple load models.Moradi and Abedini [17], four kinds of DGs are considered which respectively includes inject or absorb active power only, inject or absorb reactive power only, inject active power and absorb reactive power, inject both active power and reactive power.El-Zonkoly [18] proposed different load type, under which particle swarm algorithm is used to optimize the position and capacity of multiple distributed power.Prenc et al. [20] have made an important consideration on distributed power models which generate power that rely on intermittent energy like solar and wind.Daily average electricity production curves were given corresponding to different models.Also, daily average power consumption curves were given for different loads at different points.
Aimed at reactive scheduling problem in power grid, this paper proposed an enhanced quantum-behaved particle swarm optimization (DQPSO).Based on PSO, quantum theory and differential mutation are applied.The organization of the paper is as follows.Part 2 establishes the distributed generator model and reactive power optimization model.In part 3, quantum theory is applied to form QPSO, where particles with quantum characteristics make up for the shortage of global search ability and convergence in PSO.Moreover, the differential mutation assisted QPSO (DQPSO) improves the performance further.In part 4, effectiveness of QPSO and DQPSO is verified through IEEE standard examples.Moreover, advantages of DGs are analyzed when installed to power grid.

Problem Formulation
2.1.Distributed Generation Model.In the near future, distributed generation combined with centralized power supply system will be formed.The existing DGs include photovoltaic power stations, wind power station, small thermal power stations, and garbage power station.According to power energy, distributed power supply can be divided into continuous and intermittent power supply substations.Like solar power, wind power, due to the natural factors, is unstable power supply that has great influence on the stability of grid.So, aimed at different types of DGs, it is very important for model study.
From grid control characteristic, distributed generation can be divided into two types: voltage control and reactive power compensation.
(1) Voltage Control (PV).This kind of generation is equivalent to PV node in power flow calculation.It controls generator terminal voltage by adjusting exciting voltage.It usually includes synchronous generators whose exciting voltage can be adjusted or the DGs which adopt voltage-controlled inverter to access grid, such as microgas turbine, photovoltaic system adopting voltage-controlled inverter, and fuel cell.
(2) Reactive Power Compensation (PQ).This kind of generation is equivalent to PQ node in power flow calculation, which can be regarded as the load node having a reverse trend.The reactive power output from DG is generally adjusted through controlling its power factor.This kind of generation usually includes photovoltaic system adopting current source inverter and doubly fed wind generator whose power factor can be controlled.

The Objective Function.
Reactive power optimization is a reactive power regulation means that when the structural parameters and loads of the system are given, it can make one or more performances of power system achieve optimal through optimizing some control variables.In the power system, reactive power optimization can control voltage levels and reduce power loss.The common means of regulation include regulating the generator terminal voltage, adjusting the tap position of on-load voltage regulating transformer, and adjusting the sets of shunt capacitor.This paper solves reactive power optimization by minimizing active power loss.The objective function is shown in formula (1):  = min  loss () . (1) Among them,  loss is the total active power loss.Control variable  is is the terminal voltage of generator, Tap is the tap position of on-load voltage regulation transformer, and  is the switch group number of shunt capacitors.

Constraint Conditions. The power flow equation of the equality constraints in the model is
where   ,   , and   , respectively, represent injected active power, active power output of generators, and active power consumption of load at node ;   ,   ,   , and   , respectively, represent injected reactive power, reactive power output of generators, reactive power compensation capacity of shut capacitor , and reactive power consumption of load at node .  ,   , and   , respectively, represent conductance, susceptance, and phase angle difference of voltage between nodes  and .
The control variable inequality constraints is min ,   max ,   min ,   max , Tap min , and Tap max represent the minimum and maximum capacity of capacitor, the limit of generator voltage, and the range of transformer tap.The state variable inequality constraints is max ,   min represent the upper and lower limits of node voltage.

Enhanced Quantum-Behaved Particle Swarm Optimization Algorithm
In the PSO algorithm, particle motion is described by position and velocity.The particles' trajectory is certain in iterations.With the increase in the number of iterations, the particle velocity decreases.So the particle search space is a limited and decreasing area, which cannot guarantee the global convergence.Quantum algorithm is based on the background of quantum mechanics and the aggregation of particles is described by the bound state.The particles in the bound state appear in arbitrary position of the space with a certain probability.Therefore, the randomness of quantum model can greatly enhance the global search ability of particle swarm optimization algorithm.However, there is still a problem of local convergence in it.In the search process, the diversity of particle swarm decreases and it is likely to converge to local.Therefore, applying differential mutation with a certain probability can increase randomness of particles, which can enhance search ability and improve performance of the algorithm.

Particle Swarm Optimization Algorithm (PSO).
Particle swarm optimization algorithm is based on the theory of swarm intelligence optimization algorithm.It is a simulation of bird flock foraging which guide the optimization search through cooperation and competition between individuals.In PSO, each candidate solution is rated as a particle.A number of candidate solutions make up the group of birds, namely, population.Each particle has no weight and volume, which determines its fitness with the objective function.Motion mode of each particle in the space is decided by the direction and size of the speed.Speed is mainly determined by the individual optimal location and the global optimal position; formula is as follows: where  represents the number of particles,  represents the dimension of the particle,  represents inertia weight factor,  1 and  2 represent accelerated factor,  1 and  2 are random number sequences in (0, 1) which obey uniform distribution and mutual independence,   () represents individual optimal position, and () represents global optimal position.
Particle velocity updating formula (6) consists of three parts: (1) previous evolution speed   : weighting factor  can be a positive number, and it can also be a linear or nonlinear positive number varying with time; (2) individual cognitive part:  1 ⋅ , () is a random number which obeys uniform distribution.Now, we set the attractor of one particle   as  and create a  potential well at point .Particles move in  potential well around the center of , and its position is determined by the following stochastic equation: represents characteristic length of  potential well.The detailed position formula can be seen from Section 3.3.
In the process of convergence, with the decrease of characteristic length, particle  constantly close to  finally falls into .This is the reason why particles keep collective in late iteration.

Quantum-Behaved Particle Swarm Optimization Algorithm.
In PSO algorithm, the particle's motion mode is determined by speed.The particle trajectory is certain, and the velocity of the particles is limited.The search space in iteration is a limited area which cannot cover the whole feasible region.In quantum space, there is an attractor in particle movement center.The particles in bound state appear at any point in space at a certain probability which guarantee the global search ability.
In quantum space, particle has no velocity vector and is only expressed by position formula shown as ] ,   () ∼  (0, 1) , where  represents the number of particles,  represents the dimension of particles,   () is a attractor of a particle,  is called as contraction-expansion factor, which decreases linearly from 1.0 to 0.5 with the increase of iterations, and   () is the average optimal position of all particles in one iteration.
Steps of quantum particle swarm optimization algorithm are as follows.
Step 1. Set  = 0, and initialize the current position   () of each particle.
Step 2. Calculate the fitness of current location   () of each particle and then calculate the particle's individual optimal position "pbest" and global optimal position "gbest." Step 3.According to formula (11), calculate the average optimal position of all particles.
Step 5. Compare the fitness of the current position   () with the fitness of individual optimal position   (), and if it is better than   (), then   () =   ().
Step 6. Compare the fitness of the current position   () with the fitness of global optimal position (), and if it is better than (), then () =   ().
Step 7. If the end condition (fitness value is good enough or has achieved the maximum iteration) is not achieved, set  =  + 1, and go to Step 3.

Enhanced Quantum-Behaved Particle Swarm Optimization Algorithm (DQPSO).
As we all know, algorithms based on swarm intelligence optimization all have the same problem; that is, when the swarm converges into a smaller range, the diversity will decrease.To solve the problem, we propose differential evolution to enhance the diversity.Quantumbehaved particle swarm optimization is applied with differential evolution with a probability.In earlier evolution, the probability is high in order to increase the diversity of swarm, while it is low in later evolution so as to ensure the convergence of population.Probability formula is as (12).Differential evolution method includes three parts, such as mutation, crossover, and selection: Probability = (1.0 − 0.1) * (IterMax − ) Part 1 (mutation).For each individual   ,  = 1, 2, . . ., , mutation vector is generated as where random selection numbers  1 ,  2 , and  3 are all not identical with each other and they are all different from individual number .Mutation operator  ∈ [0, 1] is a real constant factor, which is used for controlling deviation.

Part 2 (crossover).
In order to increase the diversity of population, crossover is introduced.Formula is as In the formula, CR is a crossover operator whose range is [0, 1].

Part 3 (selection).
Compare the new vector   obtained from the above formula with the one before variation.Select the better one as the next generation.In this way, all the individuals in next generation are no worse than the corresponding (3) Calculate the best average value for particle swarm (4) Update the position for each particle according to formula (11) (5) According to probability (12), select some particles to do DE as formulas ( 13), ( 14) and select the better ones individual in current generation.By the way, it not only increases the diversity of swarm but also is conducive to develop to a better direction.
The flowchart of enhanced quantum-behaved particle optimization algorithm can be seen from Figure 1.The difference between DQPSO and QPSO is that Step 5 does not exist in QPSO.

Algorithm Implementation.
For population initialization, generator terminal voltage uses real number coding and on-load voltage regulating transformer and shunt capacitor group number uses integer coding.In iterative process, in order to reduce the probability that particles fly away search space, particle velocity is limited in a range; that is, −0.3 *  max ≤  ≤ 0.3 *  max .When particles fly away the search scope, in order to keep the population number, the particles which fly out will be set anywhere in the search scope at a certain probability.

Simulation and Result
In order to verify the effectiveness of QPSO and the improved ability of DQPSO compared with QPSO, we apply the proposed algorithms in IEEE14-bus system, IEEE 57-bus system, and IEEE 118-bus system.Table 1 shows some basic data in IEEE14-bus system, 57-bus system, and 118-bus system.Given the limited space, not all parameters are listed.The maximum voltage of power generator is 1.1, and the minimum is 0.9.The tap in per on-load voltage regulating transformer can be expressed as 1.0 ± 0.025 × 8; we set the maximum capacity of each capacitor 50 MVar and the step is 10 MVar, including 5 sets.In all experiments about PSO, the parameters are set as follows:  is 0.6,  1 and  2 are 2, and  1 and  2 are random variables which obey uniform distribution in the range (0, 1).
The parameter in QPSO is where MAXITER is the maximum number of iterations and  is the current number of iteration.
In the paper, parameters of DE are set as follows:  = 0.5, CR = 0.8.

Case 1.
As we can see from Figure 2, there are five generators and 20 branches in this system.Node 1 is the slack node (balance node), nodes 2, 3, 4, 6, and 8 are PV nodes, and others are PQ node.Among them, control variables include generator voltage of nodes 1, 2, 3, 6, and 8, transformers on the branches 4-7, 4-9, and 5-6, and capacitor at node 9.In the algorithm, population size is 40 and the maximum number of iterations is 300.Ten times of experiments are done for each algorithm.The optimization results of power loss are shown in Table 2.As we can see, the best values of without optimization of PSO, QPSO, and DQPSO are 13.3933, 12.2908, 12.2648, and 12.2646, respectively.The worst are 13.3933, 12.3279, 12.2708, and 12.2694.The mean is 13.3933, 12.3119, 12.2676, and 12.2662.Whether from the best, the worst, or the mean, QPSO is better than PSO.Also, results of DQPSO are enhanced than those of QPSO.Chung et al. [21] proposed  a hybrid algorithm of differential evolution and evolutionary programming (DEEP).The best, worst, and mean results of IEEE 14-bus are 12.4486, 12.4564, and 12.4497, while our results are 12.2646, 12.2694, and 12.2662.
In Figure 3, the green line and the red line tend to be stable after 250 and 150 iterations, respectively, while the blue line tends to converge after 50 iterations.So we can conclude that the convergence ability of QPSO is higher than that of PSO and DQPSO is the best.

Case 2.
In order to verify the generality of the algorithm, this paper performs reactive power optimization experiments using IEEE 57-bus test system.As shown in Figure 4, there are 7 generators and 80 branches.Node 1 is a slack node (balance node), nodes 2, 3, 6, 8, 9, and 12 are PV nodes, and the rest are PQ nodes.As case 1, all the generators, transformers, and capacitor compensation devices are used as control variables.In this experiment, the size of population is set to 40, the maximum number of iterations is set to 300, and each algorithm is tested 10 times.The optimization results of active power loss are shown in  6. Ayan and Kilic ¸ [22] proposed artificial bee colony algorithm (ABC) for optimal reactive power.For IEEE 118-bus system, the result of the paper is 119.6923.Our result achieved by DQPSO is 111.9606, which is better than it.

DG Integration.
The integration of DGs not only reduces power loss but also improves voltage, improving stability of power grid.In the following former two examples, three DGs are installed to improve the voltage of power grid.The installed position of the first DG is determined by the following method.The DG can be installed at any node, and therefore there are many schemes.For each scheme, the average voltage deviation of all nodes is calculated.Among all schemes, the one with the smallest value means that installing one DG at the node can improve the voltage of grid best.Other DGs are installed to power system in a similar way mentioned above.

Case 1 with DG Integration.
Red line is the voltages results of power flow in modified IEEE 14-bus, where all PV power supplies are removed (Figure 7).According to the above integration method, three PQ DGs (P = 10 MW, Q = 2 MVar) are installed at nodes 14, 13, and 10.The voltage distribution is described as blue line.For green line, it indicates that a PQ DG at node 10 is replaced by a PV DG (P = 10 MW, V = 1.0).As we can see, voltage of blue line has a great improvement compared with red line.The green line is better than the blue line, which shows PV DG can improve voltage better.
Moreover, the active power loss of power grid is reduced obviously by introducing the distributed generation, and DG plays a regulatory role at voltage stability.The 14-bus system integrated with three PQ distributed generations (P = 10 MW,  In Table 6, when considering adding the above three DGs in the model, the power loss considering distributed power is reduced significantly than before.

Case 3 with DG Integration.
Because there are 53 PV gens in IEEE 118-bus system, voltages of these nodes are never changed.In order to improve voltage level obviously, we install more DGs in this case than the above two.For blue line, all the P and Q are the same (P = 10 MW, Q = 2 Mvar).For green line, we replace PV DGs (P = 10 MW, V = 1.0) with PQ DGs at nodes 21, 53, 58, 84, and 95.As can be seen from   In order to verify the effect of DGs on the active power loss, we install four PQ DGs on the test system, which, respectively, are nodes 21, 53, 84, and 95 (P = 10 MW, Q = 2 Mvar).Power loss difference can be seen from Table 7.

Conclusion
This paper proposes an enhanced quantum-behaved particle swarm optimization algorithm based on PSO, quantum theory, and differential mutation to solve reactive power optimization in power grid.Compared with the standard particle swarm optimization algorithm, the proposed algorithm has a better balance in the global search and local search.We made optimization experiments with IEEE 14-bus system, IEEE 57-bus system, and IEEE 118-bus system.The power loss optimized by PSO decreased by 7.67%, 15.17%, and 7.10% for three cases.However, it decreased by 8.35%, 18.38%, and 15.10% optimized by QPSO and decreased by 8.42%, 21.88%, and 15.73% optimized by DQPSO.The results show that QPSO has stronger ability to search for optimization.Moreover, results of DQPSO are better than those of QPSO.In addition, distributed generation integrated with grid can not only greatly improve grid power loss but also effectively regulate voltage level to prevent voltage fluctuation.For case one, the voltage deviations before and after adding DGs are 6.14% and 2.35%.For case two, the voltage deviations before and after adding DGs are 2.38% and 1.75%.In particular, in terms of improving voltage, DG based on PV is better than DG based on PQ.
Because the distributed generation is equivalent to a stable output power, this hypothesis is difficult to meet in reality.So we will consider the subsequent changes of the power output from distributed generation and study dynamic reactive power optimization strategies in the future.

Start ( 1 )
Initial position for each particle (2) Calculate pbest and gbest for each iteration

Table 1 :
Basic data of IEEE bus system.

Table 2 :
Comparison of the optimization results among above algorithms (MW).

Table 3 :
Optimization results comparison among above algorithms (MW).

Table 4 :
Optimization results comparison among above algorithms (MW).

Table 7 :
Power loss comparison (optimized by DQPSO) (MW).Figure 9, from node 10 to node 25, node 40 to node 60, and node 80 to node 100, the blue line is better, and green line is the best.Owing to large number of PV nodes, voltages of other nodes are not well improved.