**2.1. Operation principal of SVC**

The Static Var Compensator (SVC) are composed of the capacitor banks/filter banks and aircore reactors connected in parallel. The air-core reactors are series connected to thyristors. The current of air-core reactors can be controlled by adjusting the fire angle of thyristors.

The SVC can be considered as a dynamic reactive power source. It can supply capacitive reactive power to the grid or consume the spare inductive reactive power from the grid. Normally, the system can receive the reactive power from a capacitor bank, and the spare part can be consumed by an air-core shunt reactor. As mentioned, the current in the air-core reactor is controlled by a thyristor valve. The valve controls the fundamental current by changing the fire angle, ensuring the voltage can be limited to an acceptable range at the injected node(for power system var compensation), or the sum of reactive power at the injected node is zero which means the power factor is equal to 1 (for load var compensation).

#### **2.2. Assumptions**

The optimal SVC placement problem [6] has many variables including the SVC size, SVC cost, locations and voltage constraints on the system. There are switchable SVCs and fixedtype SVCs in practice. However, considering all variables in a nonlinear fashion will make the placement problem very complicated. In order to simplify the analysis, the assumptions are as follows: 1) balanced conditions, 2) negligible line capacitance, 3) time-invariant loads and 4) harmonic generation is solely from the substation voltage supply.

#### **2.3. Radial distribution system**

Figure 1 clearly illustrates an m-bus radial distribution system where a general bus *i*  contains a load and a shunt SVC. The harmonic currents introduced by the nonlinear loads are injected at each bus

At the power frequency, the bus voltages are found by solving the following mismatch equations:

$$P\_i = \left| V\_i^1 \right|^2 G\_{ii} + \sum\_{\substack{j=1 \\ j \neq i}}^m \left| V\_i^1 V\_j^1 Y\_{ij}^1 \right| \cos \left( \theta\_{ij}^1 + \mathcal{S}\_j^1 - \mathcal{S}\_i^1 \right) \qquad i = 1, 2, 3...m \tag{1}$$

$$\mathbf{Q}\_{i} = -\left| V\_{i}^{1} \right|^{2} \mathbf{B}\_{ii} + \sum\_{\substack{j=1 \\ j \neq i}}^{m} \left| V\_{i}^{1} V\_{j}^{1} Y\_{ij}^{1} \right| \sin \left( \theta\_{ij}^{1} + \delta\_{j}^{1} - \delta\_{i}^{1} \right) \qquad i = 1, 2, 3 \dots m \tag{2}$$

where

62 An Update on Power Quality

factor and three phase voltage balance.

**2. Problem formulation** 

compensation).

**2.2. Assumptions** 

**2.3. Radial distribution system** 

are injected at each bus

equations:

**2.1. Operation principal of SVC** 

uses close loop control system to regulate busbar voltage, reactive power exchange, power

This chapter describes a method based on Particle Swarm Optimisation (PSO) [5] to solve the optimal SVC allocation successfully. Particle Swarm Optimisation (PSO) method is a powerful optimization technique analogous to the natural genetic process in biology. Theoretically, this technique is a stochastic approach and it converges to the global optimum solution, provided that certain conditions are satisfied. This chapter considers a distribution system with 9 possible locations for SVCs and 27 different sizes of SVCs. A critical

The Static Var Compensator (SVC) are composed of the capacitor banks/filter banks and aircore reactors connected in parallel. The air-core reactors are series connected to thyristors. The current of air-core reactors can be controlled by adjusting the fire angle of thyristors.

The SVC can be considered as a dynamic reactive power source. It can supply capacitive reactive power to the grid or consume the spare inductive reactive power from the grid. Normally, the system can receive the reactive power from a capacitor bank, and the spare part can be consumed by an air-core shunt reactor. As mentioned, the current in the air-core reactor is controlled by a thyristor valve. The valve controls the fundamental current by changing the fire angle, ensuring the voltage can be limited to an acceptable range at the injected node(for power system var compensation), or the sum of reactive power at the injected node is zero which means the power factor is equal to 1 (for load var

The optimal SVC placement problem [6] has many variables including the SVC size, SVC cost, locations and voltage constraints on the system. There are switchable SVCs and fixedtype SVCs in practice. However, considering all variables in a nonlinear fashion will make the placement problem very complicated. In order to simplify the analysis, the assumptions are as follows: 1) balanced conditions, 2) negligible line capacitance, 3) time-invariant loads

Figure 1 clearly illustrates an m-bus radial distribution system where a general bus *i*  contains a load and a shunt SVC. The harmonic currents introduced by the nonlinear loads

At the power frequency, the bus voltages are found by solving the following mismatch

and 4) harmonic generation is solely from the substation voltage supply.

discussion using the example with result is discussed in this chapter.

$$P\_i = P\_{li} + P\_{ni} \tag{3}$$

$$Q\_i = Q\_{li} + Q\_{ni} \tag{4}$$

$$\mathbf{Y}^{1}\_{ij} = \left| \mathbf{Y}^{1}\_{ij} \right| \angle \theta^{1}\_{ij} = \begin{vmatrix} -y^{1}\_{ij} & \text{if } & \text{i} \neq j \\ y^{1}\_{i-1,i} + y^{1}\_{i+1,i} + y^{1}\_{ci} & \text{if } & \text{i} = j \end{vmatrix} \tag{5}$$

$$\mathbf{Y}\_{ii} = \mathbf{G}\_{ii} + \mathbf{j}\mathbf{B}\_{ii} \tag{6}$$

#### **2.4. Real power losses**

At fundamental frequency, the real power losses in the transmission line between buses *i* and *i*+1 is:

$$\mathbf{P}\_{\text{loss}\{i,i+1\}}^{1} = \mathbf{R}\_{i,i+1} \left( \left\| \mathbf{V}\_{i+1}^{1} - \mathbf{V}\_{i}^{1} \right\| \left\| \mathbf{Y}\_{i,i+1}^{1} \right\| \right)^{2} \tag{7}$$

So, the total real losses is:

$$P\_{loss} = \sum\_{n=1}^{N} \left( \sum\_{i=0}^{m-1} P\_{loss}^{n} (i, i+1) \right) \tag{8}$$

#### **2.5. Objective function and constraints**

The objective function of SVC placement is to reduce the power loss and keep bus voltages and total harmonic distortion (HDF) within prescribed limits with minimum cost. The constraints are voltage limits and maximum harmonic distortion factor, with the harmonics taken into account. Following the above notation, the total annual cost function due to SVC placement and power loss is written as :

Minimize

$$f = \mathbf{K}\_l \mathbf{K}\_p \mathbf{P}\_{\text{loss}} + \sum\_{j=1}^{m} \mathbf{Q}\_{cj} \mathbf{K}\_{cj} \tag{9}$$

where *j* = 1,2,….m represents the SVC sizes

$$\mathbf{Q}\_{c\circ} = \mathbf{j}^\* \mathbf{K}\_s \tag{10}$$

A PSO Approach in Optimal FACTS Selection with Harmonic Distortion Considerations 65

(16)

*<sup>i</sup> <sup>i</sup> CnI <sup>I</sup>* (17)

*n n <sup>n</sup> Y I V* (18)

(19)

(20)

\*

2

2

1 *N <sup>i</sup> <sup>n</sup> <sup>n</sup> V Vi*

where *N* is an upper limit of the harmonic orders being considered and is required to be within an acceptable range. After solving the load flow for different harmonic orders, the harmonic distortion factor (HDF) [8] that is used to describe harmonic pollution is

> 2 <sup>1</sup> % 100%

*V* 

The general case of optimal SVC locations can be selected for starting iteration. PSO calculates the optimal SVC sizes according to the optimal SVC locations. After the first time iteration, the solution of SVC locations and sizes will be recorded as old solution and add more locations to consideration. PSO is used to calculate a new solution. If the new solution is better than the old solution, the old solution will be replaced by the new solution. If else, the old solution is the best solution. Therefore, this project will continue to consider more locations until no more optimal solution, which is better than the previous solution. In this chapter, the selection of optimal SVC location is based on the following criteria: voltage, real

power loss, load reactive power and harmonic distortion factor with equal weighting.

PSO is a search algorithm based on the mechanism of natural selection and genetics. It consists of a population of bit strings transformed by three genetic operations: 1) Selection

*i*

*n Vi*

*N n*

*i*

*HDF*

It is also required to be lower than the accepted maximum value.

**3.2. Selection of optimal SVC location** 

1 *ni ni*

*i P jQ <sup>I</sup> <sup>V</sup>* 

<sup>1</sup> *<sup>n</sup>*

In this study, *C*(*n*) is obtained by field test and Fourier analysis for all the customers along the distribution feeder. The harmonic voltages are found by solving the load flow equation

1

*i*

(18), which is derived from the node equations.

calculated as follows:

**3.3. Solution algorithm** 

At any bus *i,* the r.m.s. value of voltage is defined by

The objective function (1) is minimized subject to

$$\left|V\_{\min} \le \left|V\_i\right| \le V\_{\max} \qquad i = 1, 2, 3...m \tag{11}$$

and

$$\text{HDF}\_{i} \leq \text{HDF}\_{\text{max}} \qquad i = 1, 2, 3...m \tag{12}$$

According to IEEE Standard 519 [7] utility distribution buses should provide a voltage harmonic distortion level of less than 5% provided customers on the distribution feeder limit their load harmonic current injections to a prescribed level.

#### **3. Proposed algorithm**

#### **3.1. Harmonic power flow [8]**

At the higher frequencies, the entire power system is modelled as the combination of harmonic current sources and passive elements. Since the admittance of system components will vary with the harmonic order, the admittance matrix is modified for each harmonic order studied. If the skin effect is ignored, the resulting n-th harmonic frequency load admittance, shunt SVC admittance and feeder admittance are respectively given by:

$$\mathbf{Y}\_{li}^{n} = \frac{P\_{li}}{\left|\mathbf{V}\_{i}^{1}\right|^{2}} - j\frac{\mathbf{Q}\_{li}}{n\left|\mathbf{V}\_{i}^{1}\right|^{2}}\tag{13}$$

$$Y\_{ci}^{n} = \imath{\mathcal{Y}}\_{i}^{1} \tag{14}$$

$$\chi^{\eta}\_{i,i+1} = \frac{1}{\mathcal{R}\_{i,i+1} + jn\mathcal{X}\_{i,i+1}} \tag{15}$$

The linear loads are composed of a resistance in parallel with a reactance [9]. The nonlinear loads are treated as harmonic current sources, so the injection harmonic current source introduced by the nonlinear load at bus *i* is derived as follows:

A PSO Approach in Optimal FACTS Selection with Harmonic Distortion Considerations 65

$$I\_i^1 = \left[\frac{P\_{ni} + jQ\_{ni}}{V\_i^1}\right]^\ast \tag{16}$$

$$I\_i^n = \mathbb{C}(n)I\_i^1\tag{17}$$

In this study, *C*(*n*) is obtained by field test and Fourier analysis for all the customers along the distribution feeder. The harmonic voltages are found by solving the load flow equation (18), which is derived from the node equations.

$$\mathbf{Y}^{\n\pi}\mathbf{V}^{\n\pi} = \mathbf{I}^{\n\pi} \tag{18}$$

At any bus *i,* the r.m.s. value of voltage is defined by

64 An Update on Power Quality

Minimize

and

**3. Proposed algorithm** 

**3.1. Harmonic power flow [8]** 

placement and power loss is written as :

where *j* = 1,2,….m represents the SVC sizes

The objective function (1) is minimized subject to

limit their load harmonic current injections to a prescribed level.

taken into account. Following the above notation, the total annual cost function due to SVC

According to IEEE Standard 519 [7] utility distribution buses should provide a voltage harmonic distortion level of less than 5% provided customers on the distribution feeder

At the higher frequencies, the entire power system is modelled as the combination of harmonic current sources and passive elements. Since the admittance of system components will vary with the harmonic order, the admittance matrix is modified for each harmonic order studied. If the skin effect is ignored, the resulting n-th harmonic frequency load

> 2 2 1 1 *n li li*

> > , 1 , 1

*i i i i*

*i i*

admittance, shunt SVC admittance and feeder admittance are respectively given by:

*P Q <sup>Y</sup> <sup>j</sup> V nV*

*<sup>n</sup>* 1

*<sup>R</sup> jnX*

The linear loads are composed of a resistance in parallel with a reactance [9]. The nonlinear loads are treated as harmonic current sources, so the injection harmonic current source

*li*

, 1

*i i*

*Y*

introduced by the nonlinear load at bus *i* is derived as follows:

1 *m l p loss cj cj <sup>j</sup> f KK P Q K*

(9)

\* *Q jK cj s* (10)

min max 1,2,3 *V VV <sup>i</sup> i m* (11)

max 1,2,3 *<sup>i</sup> HDF H DF i m* (12)

(13)

*<sup>n</sup>* <sup>1</sup> *Yci nYci* (14)

(15)

$$\left|\boldsymbol{V}\_{i}\right| = \sqrt{\sum\_{n=1}^{N} \left|\boldsymbol{V}\_{i}^{\boldsymbol{\eta}}\right|^{2}}\tag{19}$$

where *N* is an upper limit of the harmonic orders being considered and is required to be within an acceptable range. After solving the load flow for different harmonic orders, the harmonic distortion factor (HDF) [8] that is used to describe harmonic pollution is calculated as follows:

$$\text{HDF}\_{i}\left(\%\right) = \frac{\sqrt{\sum\_{n=2}^{N} \left| V\_{i}^{n} \right|^{2}}}{V\_{i}^{1}} \times 100\% \tag{20}$$

It is also required to be lower than the accepted maximum value.

#### **3.2. Selection of optimal SVC location**

The general case of optimal SVC locations can be selected for starting iteration. PSO calculates the optimal SVC sizes according to the optimal SVC locations. After the first time iteration, the solution of SVC locations and sizes will be recorded as old solution and add more locations to consideration. PSO is used to calculate a new solution. If the new solution is better than the old solution, the old solution will be replaced by the new solution. If else, the old solution is the best solution. Therefore, this project will continue to consider more locations until no more optimal solution, which is better than the previous solution. In this chapter, the selection of optimal SVC location is based on the following criteria: voltage, real power loss, load reactive power and harmonic distortion factor with equal weighting.

#### **3.3. Solution algorithm**

PSO is a search algorithm based on the mechanism of natural selection and genetics. It consists of a population of bit strings transformed by three genetic operations: 1) Selection or reproduction, 2) Crossover, and 3) mutation. Each string is called chromosome and represents a possible solution. The algorithm starts from an initial population generated randomly. Using the genetic operations considering the fitness of a solution, which corresponds, to the objective function for the problem generates a new generation. The string's fitness is usually the reciprocal of the string's objective function in minimization problem. The fitness of solutions is improved through iterations of generations. For each chromosome population in the given generation, a Newton-Raphson load flow calculation is performed. When the algorithm converges, a group of solutions with better fitness is generated, and the optimal solution is obtained. The scheme of genetic operations, the structure of genetic string, its encode/decode technique and the fitness function are designed. The implementation of PSO components and the neighborhood searching are explained as follows.

A PSO Approach in Optimal FACTS Selection with Harmonic Distortion Considerations 67

1 *Xt Xt Vt id id id* (22)

(23)

*id* 1 \* 1\* 1 2 *id id* 1 \* 2\* *gd id* 1 (21)

*V t V t C rand P X t C rand P X t id*

where *Vid* is the particle velocity, *Xid* is the current particle (solution). *Pid* and *Pgd* are defined as above. *rand1* and *rand2* are random numbers which is uniformly distributed between [0,1]. *C1, C2* are constant values which is usually set to *C1 = C2 = 2.0*. These constants represent the weighting of the stochastic acceleration which pulls each particle towards the

ω \* ω *max i f <sup>f</sup>*

where i and f are the initial and final values of the inertia weight respectively. *iter* and *itermax* are the current iterations number and maximum allowed iterations number

The velocities of particles on each dimension are limited to a maximum velocity *Vmax*. If the sum of accelerations causes the velocity on that dimension to exceed the user-specified *Vmax*,

There are two stopping criteria in this chapter. Firstly, i(t is the number of iterations since the last change of the best solution is greater than a preset number. The PSO is terminated

For the PSO, the constriction and inertia weight factors are introduced and (21) is improved

 <sup>2</sup> 12 12 12

2

 

*gd id* 1 (24)

(25)

*V t k V t rand P X t rand P X t id*

2 4

 

where *k* is a constriction factor from the stability analysis which can ensure the convergence (i.e. avoid premature convergence) where ߮ଵ ߮ଶ> 4 and kmax < 1 and is dynamically set

*id* 1 \* 1\* 1 2 *id id* 1 \* 2\*

*max iter iter iter*

*pbest* and *gbest* position. ω is the inertia weight and it can be expressed as follows:

 

Number of particles in the swarm, *N* = 30 (the typical range is 20 – 40)

The maximum velocity of particles, *Vmax =*10% of search space

the velocity on that dimension is limited to *Vmax*.

Maximum allowed generation, *itermax* = 100

 Inertia weight, *wi* = 0.9, *wf* = 0.4 Acceleration factor, *C1* and *C2* = 2.0

while maximum iteration is reached.

In this chapter, the parameters used for PSO are as follows:

 

*k*

respectively.

as follows.

as follows:
