# Particle Swarm Optimization and Bacterial Foraging Optimization Techniques for Optimal Current Harmonic Mitigation by Employing Active Power Filter

Authors: Sushree Sangita Patnaik; Anup Kumar Panda
Journal: Applied Computational Intelligence and Soft Computing
 (2012)

---

## Abstract

Conventional mathematical modeling-based approaches are incompetent to solve the electrical power quality problems, as the power system network represents highly nonlinear, nonstationary, complex system that involves large number of inequality constraints. In order to overcome the various difficulties encountered in power system such as harmonic current, unbalanced source current, reactive power burden, active power filter (APF) emerged as a potential solution. This paper proposes the implementation of particle swarm optimization (PSO) and bacterial foraging optimization (BFO) algorithms which are intended for optimal harmonic compensation by minimizing the undesirable losses occurring inside the APF itself. The efficiency and effectiveness of the implementation of two approaches are compared for two different conditions of supply. The total harmonic distortion (THD) in the source current which is a measure of APF performance is reduced drastically to nearly 1% by employing BFO. The results demonstrate that BFO outperforms the conventional and PSO-based approaches by ensuring excellent functionality of APF and quick prevail over harmonics in the source current even under unbalanced supply.


---

## Body

## 1. Introduction

Introduced by Kennedy and Eberhart in the year 1995 [1], particle swarm optimization (PSO) has emerged as a proficient stochastic approach of evolutionary computation. Since then it has been employed in various fields of applications and research and is successful in yielding an optimized solution. This algorithm mimics the social behavior executed by the individuals in a bird flock or fish school while searching for the best food location (global optima). The PSO algorithm neither depends upon the initial condition nor on the gradient information. Since it depends only on the value of objective function, it makes the algorithm computationally less expensive and much simple to implement. The low CPU and memory requirement is another advantage. However, some experimental results show that the local search ability around the optima is very poor though the global search ability of PSO is quite good [2–4]. This results in premature convergence in problems where multiple optima exist and; hence, the performance is degraded.The bacterial foraging optimization (BFO) proposed by Passino in the year 2002 [5] is based on natural selection that tends to eliminate animals with poor foraging strategies. After many generations, poor foraging strategies are eliminated while only the individuals with good foraging strategy survive signifying survival of the fittest. BFO formulates the foraging behavior exhibited by E. colibacteria as an optimization problem. Over certain real-world optimization problems, BFO has been reported to outperform many powerful optimization algorithms in terms of convergence speed and final accuracy [6–8].The power system is continuously being subjected to huge disturbances due to the proliferation of large number of nonlinear loads such as power electronic converters, arc furnaces, fluorescent lights, motor drives, saturated transformers, switched mode power supplies, computers, and other domestic and industrial electronic loads. Though the active power filter (APF) is efficient enough to compensate for these disturbances, optimal load compensation by the APF is always desirable.This paper exploits conventional, PSO, and BFO approaches to optimize the shunt APF performance for optimal load compensation, and the results demonstrate that the APF that implements BFO converges to global optimum solution faster compared to APFs employing conventional method and PSO.


## 2. Particle Swarm Optimization

The mechanism of PSO is initialized with a group of randomly dispersed particles assigned with some arbitrary velocities. The particles fly in thed-dimensional problem space, cluster together, and finally converge to a global optimum area. The movement of particles in the search space is in accordance with the flying experience of the individual and its neighboring particles in the swarm population (swarm intelligence). Let the ith particle in the swarm be at xid(t) moving with a velocity Vid(t). Then, the position and velocity of the particle at next iteration will be xid(t+1) and Vid(t+1), respectively, which is illustrated in Figure 1 and can be given mathematically as(1)Vid(t+1)=w⋅Vid(t)+c1⋅r1[pid(t)-xid(t)]+c2⋅r2[gd(t)-xid(t)],(2)xid(t+1)=xid(t)⋅Vid(t+1).Figure 1
Position and velocity update ofith particle in the swarm.In the above expression, parameterw is known as inertia constant that maintains a balance between the local and global search. c1 and c2 are acceleration constants. r1 and r2 are two independently generated random numbers which are uniformly distributed in the interval [-1,1].pid(t) represents coordinates of the best location discovered as yet by the ith particle (local optima), whereas the coordinates of best location discovered thus far by the entire swarm (global optima) are stored in gd(t) (Figure 2).Figure 2
Trajectory of particles in the search space at various iterations in order (a–e) while moving towards the global minima, and (f) indicates the values of fitness function at various locations in the search space.The exploration of new search space depends upon the value of inertia constant(w). Therefore, Eberhart and Shi proposed a modified w that decreases linearly with the successive iterations [9], which can be given as(3)w=wmax⁡-(wmax⁡-wmin⁡)gG.
Here g is the generation index representing the current number of evolutionary generations, G is the predefined value of maximum number of generations, and wmax  and wmin are the maximal and minimal weights. Initially the value of w is 0.9 in order to allow the particles to find the global optimum neighborhood faster. The value of w is set to 0.4 upon finding out the optima so that the search is shifted from exploratory mode to exploitative mode. The search process terminates when there is no further improvement in the global optimum solution or the number of iterations executed becomes equal to its maximum predefined value. The entire process of PSO is represented as a flowchart in Figure 3.Figure 3
Flowchart of PSO algorithm.


### 2.1. Iterative Algorithm for PSO

Step 1.
Initialize the size of swarm, dimension of search space, maximum number of iterations, and the PSO constantsw, c1, and c2. Define the random numbers r1 and r2. Find out the current fitness of each particle in the population.Step 2.
Assign the particles with some random initial positions(x) and velocities (v). Set the counter for iteration (k) to zero. For the initial population, local best fitness of each particle is its own fitness value, and local best position (pid) of each particle is its own current position, that is,(4)pid=currentpositionofithparticle.Step 3.
The global best fitness value is calculated by(5)Globalbestfitness=min⁡(localbestfitness).
The position corresponding to global best fitness is the global best position (gd).Step 4.
Update the particle velocity and particle position for next iteration by (1) and (2).Step 5.
By settingk=k+1, increment the iteration counter.
Find out the current fitness of each particle.
If current fitness < local best fitness, set(6)Localbestfitness=currentfitness,(7)pid=currentposition.Step 6.
After calculating the local best fitness of each particle, the current global best fitness for thekth iteration is determined by(8)Currentglobalbestfitness=min⁡(localbestfitness).
If current global best fitness < global best fitness, then(9)Globalbestfitness=currentglobalbestfitness.
The position corresponding to global best fitness is assigned to gd.Step 7.
Repeat Steps5 and 6 until k is equal to the maximum number of iterations defined in Step 1 or there is no improvement in the global best fitness value.Step 8.
Terminate the iterative algorithm, when there cannot be any further execution of iterations.


## 2.1. Iterative Algorithm for PSO

Step 1.
Initialize the size of swarm, dimension of search space, maximum number of iterations, and the PSO constantsw, c1, and c2. Define the random numbers r1 and r2. Find out the current fitness of each particle in the population.Step 2.
Assign the particles with some random initial positions(x) and velocities (v). Set the counter for iteration (k) to zero. For the initial population, local best fitness of each particle is its own fitness value, and local best position (pid) of each particle is its own current position, that is,(4)pid=currentpositionofithparticle.Step 3.
The global best fitness value is calculated by(5)Globalbestfitness=min⁡(localbestfitness).
The position corresponding to global best fitness is the global best position (gd).Step 4.
Update the particle velocity and particle position for next iteration by (1) and (2).Step 5.
By settingk=k+1, increment the iteration counter.
Find out the current fitness of each particle.
If current fitness < local best fitness, set(6)Localbestfitness=currentfitness,(7)pid=currentposition.Step 6.
After calculating the local best fitness of each particle, the current global best fitness for thekth iteration is determined by(8)Currentglobalbestfitness=min⁡(localbestfitness).
If current global best fitness < global best fitness, then(9)Globalbestfitness=currentglobalbestfitness.
The position corresponding to global best fitness is assigned to gd.Step 7.
Repeat Steps5 and 6 until k is equal to the maximum number of iterations defined in Step 1 or there is no improvement in the global best fitness value.Step 8.
Terminate the iterative algorithm, when there cannot be any further execution of iterations.


## 3. Bacterial Foraging Optimization

The BFO is a nongradient optimization problem which is inspired by the foraging strategy used byE. coli bacteria such that it maximizes their energy intake (E) per unit time (T) spent in foraging. The four principal mechanisms observed in bacteria are chemotaxis, swarming, reproduction, and elimination-dispersal.The flowchart of BFO algorithm which mimics the above four mechanisms is presented in Figure4.Figure 4
Flowchart of BFO algorithm.


### 3.1. Chemotaxis

The movement ofE. coli bacteria in the human intestine in search of nutrient-rich location away from noxious environment is accomplished with the help of the locomotory organelles known as flagella by chemotactic movement in either of the ways, that is, swimming (in the same direction as the previous step) or tumbling (in an absolutely different direction from the previous one). Suppose θi(j,k,l) represents the ith bacterium at jth chemotactic, kth reproductive, and lth elimination-dispersal step. Then chemotactic movement of the bacterium may be mathematically represented by (10). In the expression, C(i) is the size of the unit step taken in the random direction, and Δ(i) indicates a vector in the arbitrary direction whose elements lie in [-1,1] as follows:(10)θi(j+1,k,l)=θi(j,k,l)+C(i)Δ(i)ΔT(i)⋅Δ(i).


### 3.2. Swarming

This group behavior is seen in several motile species of bacteria, where the cells, when stimulated by a high level ofsuccinate, release an attractant aspertate. This helps them propagate collectively as concentric patterns of swarms with high bacterial density while moving up in the nutrient gradient. The cell-to-cell signaling in bacterial swarm via attractant and repellant may be modeled as per (11), where Jcc(θ(i,j,k,l)) specifies the objective function value to be added to the actual objective function that needs to be optimized, to present a time varying objective function, S indicates the total number of bacteria in the population, p is the number of variables to be optimized, and θ=[θ1,θ2,…,θp]T is a point in the p-dimensional search domain. The coefficients dattractant, wattractant, hrepellant, and wrepellant are the measure of quantity and diffusion rate of the attractant signal and the repellant effect magnitude, respectively,(11)Jcc(θ(i,j,k,l))=∑i=1SJcc(θ,θi(j,k,l))=∑i=1S[-dattractantexp⁡(-wattractant∑m=1p(θm-θmi)2)]+∑i=1S[hrepellantexp⁡(-wrepellant∑m=1p(θm-θmi)2)].


### 3.3. Reproduction

The fitness value forith bacterium after travelling Nc chemotactic steps can be evaluated by the following equation:(12)Jhealthi=∑j=1Nc+1Ji(j,k,l).
Here Jhealthi represents the health of ith bacterium. The least healthy bacteria constituting half of the bacterial population are eventually eliminated while each of the healthier bacteria asexually split into two, which are then placed in the same location. Hence, ultimately the population remains constant.


### 3.4. Elimination and Dispersal

The BFO algorithm makes some bacteria to get eliminated and dispersed with probabilityPed after Nre number of reproductive events to ensure that the bacteria do not get trapped into a local optimum instead of the global optima.


## 3.1. Chemotaxis

The movement ofE. coli bacteria in the human intestine in search of nutrient-rich location away from noxious environment is accomplished with the help of the locomotory organelles known as flagella by chemotactic movement in either of the ways, that is, swimming (in the same direction as the previous step) or tumbling (in an absolutely different direction from the previous one). Suppose θi(j,k,l) represents the ith bacterium at jth chemotactic, kth reproductive, and lth elimination-dispersal step. Then chemotactic movement of the bacterium may be mathematically represented by (10). In the expression, C(i) is the size of the unit step taken in the random direction, and Δ(i) indicates a vector in the arbitrary direction whose elements lie in [-1,1] as follows:(10)θi(j+1,k,l)=θi(j,k,l)+C(i)Δ(i)ΔT(i)⋅Δ(i).


## 3.2. Swarming

This group behavior is seen in several motile species of bacteria, where the cells, when stimulated by a high level ofsuccinate, release an attractant aspertate. This helps them propagate collectively as concentric patterns of swarms with high bacterial density while moving up in the nutrient gradient. The cell-to-cell signaling in bacterial swarm via attractant and repellant may be modeled as per (11), where Jcc(θ(i,j,k,l)) specifies the objective function value to be added to the actual objective function that needs to be optimized, to present a time varying objective function, S indicates the total number of bacteria in the population, p is the number of variables to be optimized, and θ=[θ1,θ2,…,θp]T is a point in the p-dimensional search domain. The coefficients dattractant, wattractant, hrepellant, and wrepellant are the measure of quantity and diffusion rate of the attractant signal and the repellant effect magnitude, respectively,(11)Jcc(θ(i,j,k,l))=∑i=1SJcc(θ,θi(j,k,l))=∑i=1S[-dattractantexp⁡(-wattractant∑m=1p(θm-θmi)2)]+∑i=1S[hrepellantexp⁡(-wrepellant∑m=1p(θm-θmi)2)].


## 3.3. Reproduction

The fitness value forith bacterium after travelling Nc chemotactic steps can be evaluated by the following equation:(12)Jhealthi=∑j=1Nc+1Ji(j,k,l).
Here Jhealthi represents the health of ith bacterium. The least healthy bacteria constituting half of the bacterial population are eventually eliminated while each of the healthier bacteria asexually split into two, which are then placed in the same location. Hence, ultimately the population remains constant.


## 3.4. Elimination and Dispersal

The BFO algorithm makes some bacteria to get eliminated and dispersed with probabilityPed after Nre number of reproductive events to ensure that the bacteria do not get trapped into a local optimum instead of the global optima.


## 4. Active Power Filter

The shunt APF is intended to be used not merely for compensation of current harmonics but also for unbalance in the source current generated due to nonlinear loads. It injects filter-generated current harmonics of equal magnitude and opposite phase as the load current harmonics at the point of common coupling (PCC) between the source and the load as illustrated in Figure5. The APF comprising a three-phase pulse-width modulation-(PWM-) based voltage source inverter (VSI) employing various control schemes has gained well recognition [10]. For proper functioning of APF, it is crucial to design an appropriate control scheme. In the conventional instantaneous active and reactive power (p-q) method, the entire reactive power and oscillating component of active power are used for generation of reference compensation currents [11]. The multiplication of instantaneous load currents and voltages while calculating the instantaneous powers caused amplification of harmonic content leading to imprecise harmonic compensation. Later, the instantaneous active and reactive current component (id-iq) method is proposed to replace the p-q method as it brings down the total harmonic distortion (THD) in supply current below 5% so as to satisfy the IEEE-519 standards even under nonideal supply voltage [12, 13].Figure 5
System configuration for 3-phase 3-wire shunt APF along with the nonlinear load.In this paper, the performance of APF with conventional control is improved by means of PSO and BFO algorithms since the conventional approach becomes complex to implement as the power system represents a highly nonlinear and nonstationary system. Moreover, the conventional control yields inadequate result at every operating point except the one at which it is designed to be operated [14, 15].


### 4.1. Shunt APF System Configuration

The system configuration of a 3-phase 3-wire shunt APF is depicted in Figure5. The filter performance is studied under ideal and unbalanced supply conditions. Here the nonlinear load is consisting of diode rectifier with R-L load on the dc side. The APF is comprised of a VSI with hysteresis PWM current control. Controller for the APF is designed using id-iq control scheme. Inputs to the controller are the three-phase load currents and the dc-link capacitor voltage of the inverter. The gains of the PI controller used for dc-link voltage regulation are optimized using conventional, PSO and BFO techniques. Output of the controller is reference compensation current template. The actual filter currents and the reference compensation currents are compared in a hysteresis comparator giving away the current pulses for switching actions to be carried out in the switching devices (IGBTs) of the VSI. Finally the filter-generated compensating current is injected into the power system at PCC to assure that sinusoidal and compensated current is drawn from the utility.


### 4.2. Optimization Problem for dc-Link Voltage Regulation

While operating under steady-state condition of the shunt APF, the VSI should neither absorb nor deliver active power. So the main concern lies in getting an optimally tuned PI controller which satisfies the conditions of dynamics and stability together in order to make the dynamics of inverter dc-link voltage(Vdc) sufficiently low. In various conventional PI controller-tuning methods such as Ziegler-Nichols method, the recommended settings are empirical in nature and require extensive experimentation. Hence, there is always scope for improving the tuning of PI controller that yields suitable values of proportional gain (Kp) and integral gain (Ki) for which it gives better settling time within tolerable limits of maximum overshoot. This purpose can be accomplished by implementing PSO and BFO to minimize the deviation of Vdc from its reference Vdc* value. Maximum overshoot (ΔVdcmax), rise time (tr), and steady-state error (Ess) are the constraints that imply the optimality of PI controller. The objective here is to reduce dc-link voltage deviation(ΔVdc)  which can be given by(13)ΔVdc=Vdc*-VdcThe performance criteria chosen in this paper are integral square error (ISE), and the objective function to be optimized(J) is estimated using (14) which represents a nonconstrained optimization problem. In the expression, α and β symbolize weighing factors, t0 is the starting time, and ts is the settling time of transient:(14)J=∫0t(ΔVdc)2dt=β⋅ΔVdcmax+(1-β)(ts-t0)+α⋅|Ess|.
The significance of weighing factors is that, α is used to overcome the steady-state voltage error Ess and β decides the values of ΔVdcmax and ts. Large value of β results in less overshoot, whereas smaller value of β results in reduced settling time.


### 4.3. Reference Compensation Current Extraction

The PI controller output signalid1h represents the total active current required to maintain the dc-link voltage at a constant level and to compensate the losses in the APF due to the presence of inductances and semiconductor switches. The three-phase load currents (iLa,iLb,iLc) are tracked by the use of current sensors, upon which Park’s transformation is performed in order to find out the corresponding d-q axis current components iLd and iLq with the help of(15)[iLdiLq]=[iLd1h+iLdnhiLq1h+iLqnh]=23[sin⁡wtcos⁡wt-cos⁡wt-sin⁡wt][1-12-12032-32][iLaiLbiLc].According toid-iq control strategy, the load should only draw the average value of direct-axis component of load current from the supply. Here iLd1h and iLq1h indicate the fundamental frequency component of the currents iLd and iLq, respectively. The oscillating components of the currents iLd and iLq, that is, iLdnh and iLqnh, respectively, are filtered out by using Butterworth’s low-pass filter with cut-off frequency of fc=f/2 (f= fundamental supply frequency). The currents iLdnh and iLqnh along with id1h are utilized to generate the reference compensation current template icd* and icq* in d-q coordinates, followed by inverse Park’s transformation giving away the three-phase compensating currents ica*, icb*, and icc* in a-b-c reference frame as described in (16). The zero-sequence current ic0* is brought into play in order to make the transformation matrix a square one as follows:(16)[ica*icb*icc*]=[sin⁡wtcos⁡wt1sin⁡(wt-2π3)cos⁡(wt-2π3)1sin⁡(wt+2π3)cos⁡(wt+2π3)1][icd*icq*ic0*].In Figure6, the entire scheme of reference current generation for shunt APF using id-iq method has been illustrated. This scheme does not require a phase-locked loop (PLL) as only current quantities are involved; hence, synchronization between phase currents and voltages is not needed.Figure 6
Reference compensation current extraction usingid-iq control scheme.The reference signals, thus, obtained are compared with the actual compensating filter currents in a hysteresis comparator as shown in Figure5, where the actual current is forced to follow the reference. Hysteresis band current controller is intended to be used for instantaneous compensation by the APF on account of its easy implementation and quick prevail over fast current transitions. This consequently provides switching signals to trigger the IGBTs inside the inverter. Ultimately, the filter provides necessary compensation for harmonics in the source current and reactive power unbalance in the system.


## 4.1. Shunt APF System Configuration

The system configuration of a 3-phase 3-wire shunt APF is depicted in Figure5. The filter performance is studied under ideal and unbalanced supply conditions. Here the nonlinear load is consisting of diode rectifier with R-L load on the dc side. The APF is comprised of a VSI with hysteresis PWM current control. Controller for the APF is designed using id-iq control scheme. Inputs to the controller are the three-phase load currents and the dc-link capacitor voltage of the inverter. The gains of the PI controller used for dc-link voltage regulation are optimized using conventional, PSO and BFO techniques. Output of the controller is reference compensation current template. The actual filter currents and the reference compensation currents are compared in a hysteresis comparator giving away the current pulses for switching actions to be carried out in the switching devices (IGBTs) of the VSI. Finally the filter-generated compensating current is injected into the power system at PCC to assure that sinusoidal and compensated current is drawn from the utility.


## 4.2. Optimization Problem for dc-Link Voltage Regulation

While operating under steady-state condition of the shunt APF, the VSI should neither absorb nor deliver active power. So the main concern lies in getting an optimally tuned PI controller which satisfies the conditions of dynamics and stability together in order to make the dynamics of inverter dc-link voltage(Vdc) sufficiently low. In various conventional PI controller-tuning methods such as Ziegler-Nichols method, the recommended settings are empirical in nature and require extensive experimentation. Hence, there is always scope for improving the tuning of PI controller that yields suitable values of proportional gain (Kp) and integral gain (Ki) for which it gives better settling time within tolerable limits of maximum overshoot. This purpose can be accomplished by implementing PSO and BFO to minimize the deviation of Vdc from its reference Vdc* value. Maximum overshoot (ΔVdcmax), rise time (tr), and steady-state error (Ess) are the constraints that imply the optimality of PI controller. The objective here is to reduce dc-link voltage deviation(ΔVdc)  which can be given by(13)ΔVdc=Vdc*-VdcThe performance criteria chosen in this paper are integral square error (ISE), and the objective function to be optimized(J) is estimated using (14) which represents a nonconstrained optimization problem. In the expression, α and β symbolize weighing factors, t0 is the starting time, and ts is the settling time of transient:(14)J=∫0t(ΔVdc)2dt=β⋅ΔVdcmax+(1-β)(ts-t0)+α⋅|Ess|.
The significance of weighing factors is that, α is used to overcome the steady-state voltage error Ess and β decides the values of ΔVdcmax and ts. Large value of β results in less overshoot, whereas smaller value of β results in reduced settling time.


## 4.3. Reference Compensation Current Extraction

The PI controller output signalid1h represents the total active current required to maintain the dc-link voltage at a constant level and to compensate the losses in the APF due to the presence of inductances and semiconductor switches. The three-phase load currents (iLa,iLb,iLc) are tracked by the use of current sensors, upon which Park’s transformation is performed in order to find out the corresponding d-q axis current components iLd and iLq with the help of(15)[iLdiLq]=[iLd1h+iLdnhiLq1h+iLqnh]=23[sin⁡wtcos⁡wt-cos⁡wt-sin⁡wt][1-12-12032-32][iLaiLbiLc].According toid-iq control strategy, the load should only draw the average value of direct-axis component of load current from the supply. Here iLd1h and iLq1h indicate the fundamental frequency component of the currents iLd and iLq, respectively. The oscillating components of the currents iLd and iLq, that is, iLdnh and iLqnh, respectively, are filtered out by using Butterworth’s low-pass filter with cut-off frequency of fc=f/2 (f= fundamental supply frequency). The currents iLdnh and iLqnh along with id1h are utilized to generate the reference compensation current template icd* and icq* in d-q coordinates, followed by inverse Park’s transformation giving away the three-phase compensating currents ica*, icb*, and icc* in a-b-c reference frame as described in (16). The zero-sequence current ic0* is brought into play in order to make the transformation matrix a square one as follows:(16)[ica*icb*icc*]=[sin⁡wtcos⁡wt1sin⁡(wt-2π3)cos⁡(wt-2π3)1sin⁡(wt+2π3)cos⁡(wt+2π3)1][icd*icq*ic0*].In Figure6, the entire scheme of reference current generation for shunt APF using id-iq method has been illustrated. This scheme does not require a phase-locked loop (PLL) as only current quantities are involved; hence, synchronization between phase currents and voltages is not needed.Figure 6
Reference compensation current extraction usingid-iq control scheme.The reference signals, thus, obtained are compared with the actual compensating filter currents in a hysteresis comparator as shown in Figure5, where the actual current is forced to follow the reference. Hysteresis band current controller is intended to be used for instantaneous compensation by the APF on account of its easy implementation and quick prevail over fast current transitions. This consequently provides switching signals to trigger the IGBTs inside the inverter. Ultimately, the filter provides necessary compensation for harmonics in the source current and reactive power unbalance in the system.


## 5. Simulation Results

The shunt APF load compensation capability is demonstrated by means of its (a) measure of harmonic compensation in the source current and (b) dynamic performance under ideal and unbalanced supply conditions. The active filter performance is analyzed with the error between dc-link voltage and its reference value being regulated by the conventional PI controller followed by PSO- and BFO-based optimally tuned PI controllers. A diode rectifier load with dc-side resistance(RLdc), dc-side inductance (LLdc), ac-side resistance (RL), and ac-side inductance (LL) has been considered as shown in Figure 5. The nature of dc-link voltage transient (maximum overshoot, settling time, etc.) is also observed. The simulation is performed taking parameter values as given in Table 1.Table 1
System parameter values used for simulation.
System parameterSymbol usedValueSupply frequencyf50 HzSource impedanceRs, Ls0.1 Ω, 0.01 mHFilter impedanceRc, Lc0.1 Ω, 1 mHdc-link capacitanceCdc3000μFReference dc-link voltageVdc*800 VLoad parametersRLdc, LLdc, RL, LL20 Ω, 25 mH, 0.1 Ω, 3 mHThe THD of source current is a measure of the effective value of harmonic distortion and can be calculated as per (17) in which i1 is the RMS value of fundamental frequency component of current and in represents the RMS value of nth order harmonic component of current as follows:(17)THD=∑n=2∞in2i1.When the APF is not being operated, the load current is exactly reflected in the source current. The FFT (Fast Fourier transform) analysis of the source current before compensation shows the THD to be equal to 20.61%. The load current (or source current before compensation) along with its FFT analysis has been shown in Figure7.Load current waveform along with its THD.


### 5.1. Compensation of Harmonics in the Source Current

The simulation for ideal supply is carried out with the source voltage of 230 V (RMS) which is perfectly balanced and sinusoidal as depicted in Figure8. The compensation currents produced by APF employing conventional, PSO, and BFO techniques under ideal supply are shown in Figure 9. This current is added to the load current at PCC so that the resulting source current becomes sinusoidal after compensation. The corresponding source currents are also shown in the figure. For the source current obtained with each of the APF controllers, FFT analysis is done and the results show that THD obtained with APF employing BFO is much lower than conventional and PSO-based APFs.Figure 8
Ideal supply voltage waveform.Figure 9
Compensation filter current, compensated source current, and FFT analysis showing THD in source current in top to bottom order with ideal supply for (a) conventional, (b) PSO-based, and (c) BFO-based APFs.Though the supply voltage is always desired to be ideal, sometimes unbalanced supply condition is produced in the power system which may be due to the generators in the system, presence of unequal single phase loads, blown fuses in one of the phases of a three-phase capacitor bank, or single phasing conditions. For simulation with unbalanced supply condition, voltage in one of the three phases is taken 230 V (RMS), while in rest of the phases it is 200 V (RMS). The unbalanced supply voltage simulation waveform is clearly presented in Figure10. From Figure 11, the comparison of source current THDs obtained with simulation under unbalanced supply reveals that BFO is a better alternative compared to the other two in terms of current harmonic compensation by lowering down the THD.Figure 10
Unbalanced supply voltage waveform.Figure 11
Compensation filter current, compensated source current, and FFT analysis showing THD in source current in top to bottom order with unbalanced supply for (a) conventional, (b) PSO-based, and (c) BFO-based APFs.


### 5.2. Dynamic Performance of APF

Convergence characteristics of voltageVdc for both the supply conditions and all the methods of APF control are shown in Figures 12 and 13. It is observed that the APF employing BFO for PI controller tuning makes Vdc to reach its reference value of 800 V faster compared to other alternatives. As a result BFO provides speedy recovery for active filter losses and, hence, exhibits quick prevail over current harmonics. The indices for performance measurement of APF, that is, settling time (ts), maximum overshoot (ΔVdcmax), and the source current THD values are listed in Tables 2 and 3 for ideal and unbalanced supply, respectively. It shows that though BFO provides faster convergence to reach global optimum solution, there is no compromise over maximum overshoot of Vdc which is within the permissible value. A comparison of the THDs of source current for both ideal and unbalanced supply conditions without and with compensation by conventional, PSO- and BFO-based APFs is presented in Figure 14. Under ideal supply there is not much difference in the source current distortion obtained after compensation using the APFs with any of the PI controller tuning methods. But under unbalanced supply, BFO has better command over the dc-link voltage, and, hence, ultimately the distortion in source current is lowered down drastically.Table 2
APF response comparison under ideal supply condition.
Case under considerationMaximum overshoot (ΔVdcmax) in voltsVdc transient settling time (ts) in sec.Source current THD in %Without APF——20.61APF with conventional PI96.50.0531.95APF with PSO-PI53.20.0291.55APF with BFO-PI118.90.0181.05Table 3
APF response comparison for unbalanced supply condition.
Case under considerationMaximum overshoot(ΔVdcmax) in voltsVdc transient settling time (ts) in sec.Source current THD in %Without APF——20.61APF with conventional PI97.40.0584.91APF with PSO-PI68.10.0413.76APF with BFO-PI139.70.0201.37Figure 12
Convergence ofVdc with ideal supply.Figure 13
Convergence ofVdc with unbalanced supply.Figure 14
Comparison of THD in source current.


## 5.1. Compensation of Harmonics in the Source Current

The simulation for ideal supply is carried out with the source voltage of 230 V (RMS) which is perfectly balanced and sinusoidal as depicted in Figure8. The compensation currents produced by APF employing conventional, PSO, and BFO techniques under ideal supply are shown in Figure 9. This current is added to the load current at PCC so that the resulting source current becomes sinusoidal after compensation. The corresponding source currents are also shown in the figure. For the source current obtained with each of the APF controllers, FFT analysis is done and the results show that THD obtained with APF employing BFO is much lower than conventional and PSO-based APFs.Figure 8
Ideal supply voltage waveform.Figure 9
Compensation filter current, compensated source current, and FFT analysis showing THD in source current in top to bottom order with ideal supply for (a) conventional, (b) PSO-based, and (c) BFO-based APFs.Though the supply voltage is always desired to be ideal, sometimes unbalanced supply condition is produced in the power system which may be due to the generators in the system, presence of unequal single phase loads, blown fuses in one of the phases of a three-phase capacitor bank, or single phasing conditions. For simulation with unbalanced supply condition, voltage in one of the three phases is taken 230 V (RMS), while in rest of the phases it is 200 V (RMS). The unbalanced supply voltage simulation waveform is clearly presented in Figure10. From Figure 11, the comparison of source current THDs obtained with simulation under unbalanced supply reveals that BFO is a better alternative compared to the other two in terms of current harmonic compensation by lowering down the THD.Figure 10
Unbalanced supply voltage waveform.Figure 11
Compensation filter current, compensated source current, and FFT analysis showing THD in source current in top to bottom order with unbalanced supply for (a) conventional, (b) PSO-based, and (c) BFO-based APFs.


## 5.2. Dynamic Performance of APF

Convergence characteristics of voltageVdc for both the supply conditions and all the methods of APF control are shown in Figures 12 and 13. It is observed that the APF employing BFO for PI controller tuning makes Vdc to reach its reference value of 800 V faster compared to other alternatives. As a result BFO provides speedy recovery for active filter losses and, hence, exhibits quick prevail over current harmonics. The indices for performance measurement of APF, that is, settling time (ts), maximum overshoot (ΔVdcmax), and the source current THD values are listed in Tables 2 and 3 for ideal and unbalanced supply, respectively. It shows that though BFO provides faster convergence to reach global optimum solution, there is no compromise over maximum overshoot of Vdc which is within the permissible value. A comparison of the THDs of source current for both ideal and unbalanced supply conditions without and with compensation by conventional, PSO- and BFO-based APFs is presented in Figure 14. Under ideal supply there is not much difference in the source current distortion obtained after compensation using the APFs with any of the PI controller tuning methods. But under unbalanced supply, BFO has better command over the dc-link voltage, and, hence, ultimately the distortion in source current is lowered down drastically.Table 2
APF response comparison under ideal supply condition.
Case under considerationMaximum overshoot (ΔVdcmax) in voltsVdc transient settling time (ts) in sec.Source current THD in %Without APF——20.61APF with conventional PI96.50.0531.95APF with PSO-PI53.20.0291.55APF with BFO-PI118.90.0181.05Table 3
APF response comparison for unbalanced supply condition.
Case under considerationMaximum overshoot(ΔVdcmax) in voltsVdc transient settling time (ts) in sec.Source current THD in %Without APF——20.61APF with conventional PI97.40.0584.91APF with PSO-PI68.10.0413.76APF with BFO-PI139.70.0201.37Figure 12
Convergence ofVdc with ideal supply.Figure 13
Convergence ofVdc with unbalanced supply.Figure 14
Comparison of THD in source current.


## 6. Conclusion

The conventional methods used to find the coefficients of PI controller are usually based on a linearized model, which may not give satisfactory result under transient conditions. Advanced computational-intelligence-based optimization algorithms, PSO and BFO, have been implemented to tune the coefficients of PI controller to enhance the performance of power system under balanced and unbalanced source voltage conditions. Simulation results were compared with conventional PI controller tuning. The dc-link voltage settles approximately within one cycle, and also the excursion in voltage is less compared to the conventional PI controller. Further the THDs of the source current have improved significantly, which indicates the elimination of harmonics and verified superior functionality of PSO and BFO algorithms. Out of the three approaches, the BFO-PI based APF validates excellent functionality, superior harmonic compensation capability, and robustness.



---

*Source: 897127-2012-01-09.xml*