#### Abstract

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 is more, DQPSO is better than QPSO. 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.

#### 1. 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–3], particle swarm optimization algorithm (PSO), seeker optimization algorithm [4], clustering optimization algorithm [5], and so forth. Papers [1–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–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–20]. In papers [14–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.

#### 2. 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.

##### 2.2. 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:

Among them, is the total active power loss. Control variable is is the terminal voltage of generator, is the tap position of on-load voltage regulation transformer, and is the switch group number of shunt capacitors.

##### 2.3. 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 , , , , , and 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 , represent the upper and lower limits of node voltage.

#### 3. 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.

##### 3.1. 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, and represent accelerated factor, and are random number sequences in 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: represents particles’ own thinking, making the particles have global search ability;(3)global cognitive part: represents particles’ global thinking, making particles have local search ability. Location formula is as follows:

##### 3.2. Quantum Theory

Quantum mechanics is the theory of studying microscopic particles properties and movement. Newtonian mechanics can never be used to describe the movement of microscopic particles. Therefore, Newtonian mechanics is applied in macroscopic object whose speed is low and movement track is certain, while the movement of microscopic particles is uncertain and obeys statistical law.

In quantum space, the aggregation of particles is expressed as bound state. The reason why bound state exists is that there is attractive potential energy in movement center. The particle in bound state appears at any point in space at a certain probability, which changes the concept of continuous path in classical mechanics.

The attractor is denoted by formula 8: or 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.

##### 3.3. 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 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 , 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 4. *According to formula 11, update the particle’s position.

*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 , and go to Step 3.

##### 3.4. 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. Quantum-behaved 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:

*Part 1 (mutation)*. For each individual , , mutation vector is generated as
where random selection numbers , , and are all not identical with each other and they are all different from individual number . Mutation operator 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, is a crossover operator whose range is .

*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 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.

##### 3.5. 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, . 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.

#### 4. 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 ; 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, and are 2, and and are random variables which obey uniform distribution in the range .

The parameter in QPSO is where is the maximum number of iterations and is the current number of iteration.

In the paper, parameters of DE are set as follows: , .

##### 4.1. 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.

##### 4.2. 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 Table 3. The best values of without optimization of PSO, QPSO, and DQPSO are 27.8638, 22.5018, 21.9230, and 21.6547. The worst are 27.8638, 24.1729, 22.3840, and 21.9254. The mean is 27.8638, 23.0419, 22.1203, and 21.7670. The convergence curves of PSO, QPSO, and DQPSO are shown in Figure 5. In paper [21], the best, worst, and mean results of IEEE 57-bus are 23.9555, 24.0928, and 23.9955, while our results are 21.6547, 21.9254, and 21.7670.

##### 4.3. Case 3

Due to complexity of IEEE 118-bus test system, electrical connection diagram will not be provided. The same as the above two cases, all the generators, transformers, and capacitor compensation devices are used as control variables. The optimization results of active power loss are given in Table 4. The best values of without optimization of PSO, QPSO, and DQPSO are 132.8630, 120.3153, 112.0771, and 110.7368. The worst are 132.8630, 126.0460, 114.1884, and 113.0413. The mean is 132.8630, 123.4233, 112.8061, and 111.9606. The convergence curves of PSO, QPSO, and DQPSO are shown in Figure 6. Ayan and Kiliç [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.

##### 4.4. 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.

###### 4.4.1. 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,* Q* = 2 Mvar) is compared with the one without DGs, and the results are shown in Table 5. From the table we can know that active power loss reduces significantly with distributed generation, and the average decrease is 24.3%.

###### 4.4.2. Case 2 with DG Integration

In Figure 8, red line is the voltage of power flow in IEEE 57-bus. Blue line is the voltage of power flow after integrating three PQ DGs at nodes 33 (*P* = 10 MW,* Q* = 2 MVar), 56 (*P* = 10 MW,* Q* = 2 MVar), and 50 (*P* = 0 MW,* Q* = −10 MVar), and reactive power at node 50 is negative which means the DG absorbs reactive power only. For green line, a PQ DG at node 50 is replaced with a PV DG (*P* = 0 MW,* V* = 1.0). The obvious improvement on voltage can be seen from node 28 to node 43 by integrating DGs. It should be noted that adding PV DG at node 50 gains the best improvement.

In Table 6, when considering adding the above three DGs in the model, the power loss considering distributed power is reduced significantly than before.

###### 4.4.3. 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 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.

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.

#### 5. 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.

#### Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

#### Acknowledgments

The authors would like to thank the anonymous reviewers for the careful reading of the original paper. This work was supported by the Fundamental Research Funds for the Central Universities (no. 2014MS29) and State Grid Corporation of China (no. NY71-13-036); they are gratefully acknowledged.