Page 1

IEEE TRANSACTIONS ON POWER ELECTRONICS, VOL. 22, NO. 2, MARCH 2007593

A DSP Based Optimal Algorithm for Shunt Active

Filter Under Nonsinusoidal Supply and

Unbalanced Load Conditions

Sincy George, Member, IEEE, and Vivek Agarwal, Senior Member, IEEE

Abstract—The use of power electronic circuits in a wide range

of applications has resulted in distorted current waveforms in the

power system. This results in nonsinusoidal voltage drops across

the transformers and transmission line impedances, resulting in

a nonsinusoidal voltage supply at the point of common coupling.

Asymmetrical distribution of large, 1-

the issue by causing imbalance in the line currents of the 3-

system. Not only should this imbalance be compensated, other

parameters, such as the current total harmonic distortion and the

power factor should also be maintained as per the norms. How-

ever, the requirements of harmonic free current waveforms and

good power factor, under nonsinusoidal voltage conditions, are

contradictory to each other. Under these conditions, an optimum

performance is the best one can achieve. This paper proposes a

new scheme for balancing the currents and obtaining the best

compromise between the power factor and current distortion

under nonsinusoidal voltage conditions. The technique does not

use – theory and does not require sequence transformation for

power calculations, even though the current is unbalanced. All the

details of this work are presented.

loads further complicates

Index Terms—Current imbalance, harmonics, nonsinusoidal

voltage, optimization, power factor, shunt active filter (SAF).

I. INTRODUCTION

I

the utility. This imbalance may be due to uneven distribution

of continuously changing large, single-phase loads or unequal

distribution of system impedances. Wide spread use of power

electronic circuits in recent times has compounded the problem

by inducing harmonics (waveform distortion) into the system.

These nonlinear loads, apart from injecting harmonic current

intothesystem,alsocauselowpowerfactor.Theresultingunbal-

anced,nonsinusoidalsupplyvoltageandcurrentadverselyaffect

every component in the power system and equipment such as

inductionmotors,powerelectronicconvertersanddrives[1],[2].

Unbalance in load current leads to excessive neutral currents,

poor power factor, increased losses, and reduction in overall ef-

ficiency. There are norms which put a limit on the negative se-

quencecurrentcapabilityofsynchronousmachines[3].Another

majorproblemwithunbalancedloadcurrentisthatitresultsinto

N A 3-

or current is a matter of concern for both the consumers and

power distribution system, imbalance in voltage

Manuscript received September 1, 2005; revised May 19, 2006. This

paper was presented in part at the Power Electronics Specialists Conference,

Mexico, June 15–19, 2003. Recommended for publication by Associate Editor

H. du T. Mouton.

The authors are with the Department of Electrical Engineering, Indian In-

stitute of Technology-Bombay, Mumbai 400 076, India (e-mail: agarwal@ee.

iitb.ac.in).

Digital Object Identifier 10.1109/TPEL.2006.890001

Fig. 1. Shunt active filter used for compensating a 3-? nonlinear load.

an unbalanced voltage in the system. But that issue is not con-

sidered in this work. It just takes into account the distortion in

the supply voltage waveforms.

Conventionally,passivefiltershavebeenusedtoeliminatethe

line current harmonics [4]. However, in practical applications,

where the amplitude and the order of harmonic content varies

randomly, this solution becomes ineffective and active power

filter (APF) emerges as a viable alternative. The good thing is

that these active filters can also eliminate the imbalance in the

supply current.

The most commonly used active filter is the “shunt active

filter (SAF)” shown in Fig. 1. An SAF is a current controlled,

voltage source inverter, connected in parallel with the load,

which supplies the undesired harmonics and reactive power

to the load, so that the supply current is of good quality. In

addition to this, SAF can also be used to balance the supply

current by supplying the required amount of active power per

phase to the load.

A few techniques are available [5]–[8], for compensation of

unbalanced, distorted current using an SAF. Dixon [5], has im-

plemented a sample and hold circuit to generate the reference

signal for an SAF which eliminates, the need for a complicated

transformation for generating reference compensating current

for the SAF. Bhim Singh et al., [6] have proposed a new con-

trol scheme to eliminate harmonics, to compensate for reactive

power and neutral current and to balance the supply current.

Bhavaraju [7], has suggested a method by which the negative

sequence components of load current are injected by the shunt

filtertomakethesourcecurrentabalancedone.Chen[8]hasre-

ported an algorithm for the generation of compensating current

0885-8993/$25.00 © 2007 IEEE

Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY BOMBAY. Downloaded on November 29, 2008 at 01:17 from IEEE Xplore. Restrictions apply.

Page 2

594 IEEE TRANSACTIONS ON POWER ELECTRONICS, VOL. 22, NO. 2, MARCH 2007

Fig. 2. Pictorial representation of generation of nonsinusoidal voltage at the

PCC.

in such a way that the source supplies only the balanced funda-

mental current at unity power factor. It does not use any

transformation, but uses the sequence components for power

calculation.

Most of the techniques mentioned in the preceding paragraph

assume a sinusoidal supply voltage for compensation of unbal-

anced, nonlinear load current. However, in reality, the voltage

supplied to the consumer at the downstream end

nusoidal due to the nonlinear loads connected at the upstream

end

of the power system as shown in Fig. 2.

When the supply voltage is nonsinusoidal and it is connected

to an unbalanced nonlinear load, any attempt to get harmonic

free current by installing a shunt filter at point “P,” will result in

apoorpowerfactor.Similarly,anyattempttoimprovethepower

factor will result in distorted current waveforms. This trade-off

can be eliminated by using nonlinear optimization technique

[9]–[11] to achieve the following.

i) An optimized power factor.

ii) An optimized current total harmonic distortion (THD)

which is within the limit stipulated by power quality

norms.

iii) A balanced source current.

This paper presents a new compensation cum optimization

technique for a shunt active filter, which optimizes the power

factor, satisfies the current THD limit and compensates (elimi-

nates) the imbalance in the source current under nonsinusoidal

supply voltage conditions. Thus, it does not completely elim-

inate the harmonics, but reduces the magnitude of individual

harmonic component in such a way that the THD in current

is within the limit specified by the standards. The technique

does not use any – or – or sequence component transfor-

mation for the generation of the reference compensating current

signal.Thetechniqueisalsoapplicableduringsinusoidalsupply

voltage conditions with linear or nonlinear load.

The remaining of this paper is organized into the following

sections. Section II presents the basic concepts of the algorithm

used in the proposed optimization and compensation scheme.

Section III discusses the optimization technique used for deter-

mining the control variable for the generation of the reference

compensating current signal. Section IV describes two possible

methods of power calculation under nonsinusoidal, unbalanced

conditions. Results of the computer simulations are presented

–

is nonsi-

Fig. 3. Block diagram of the proposed scheme.

in Section V and hardware implementation details using dig-

ital signal processor (DSP) TMS 320LF2407A are included in

Section VI. Section VII summarizes the major conclusions of

this work.

II. BASIC CONCEPTS OF THE ALGORITHM

USED IN THE PROPOSED SCHEME

The block diagram of the proposed compensation scheme is

shown in Fig. 3. The power circuit of the scheme consists of a

3-

nonsinusoidal supply voltage connected to an unbalanced

nonlinear load. Two series connected dc capacitors, with their

mid point connected to the neutral of the power system, serve

as input to the inverter. This helps in independent control of in-

verterswitchesconnectedineachlegoftheinverter.Thecontrol

circuitconsistsofaDSPwhichgeneratesthereferencecompen-

sating current from the sensed supply voltage and load current.

Subsequently, hysteresis current control technique is used to

generate pulses to trigger the switching devices of the inverter.

Hysteresis control uses three independent controllers, one for

each phase. When the line current exceeds the hysteresis band’s

upper margin, the lower switch of the inverter leg is turned ON,

whileifthecurrentfallsbelowthehysteresisband’slowerlimit,

the upper switch is turned ON. The output of the inverter (i.e.,

the compensation current) is fed to the power system to achieve

the desired source current.

To analyze the compensation mechanism followed, let’s as-

sume a 3- balanced supply voltage (

set of harmonic components,

voltage is given by

,, ) consisting of a

. For example phase—a and

(1)

The corresponding unbalanced load current

harmonic current components

contains a set of

andas

(2)

Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY BOMBAY. Downloaded on November 29, 2008 at 01:17 from IEEE Xplore. Restrictions apply.

Page 3

GEORGE AND AGARWAL: DSP BASED OPTIMAL ALGORITHM595

where

the phase angle of th harmonic component of current. Similar

expressions are valid for other phases (i.e., b and c) also. It is

assumed that supply voltage is balanced (i.e.,

),whereastheloadcurrentisunbalanced(i.e.,

.

For unity power factor, currents drawn from the ac source

should be in phase with, and of the same shape, as the source

voltage. This implies that

rent and voltage are of the same order and their ratios are equal.

However in this case, THD may not be within the acceptable

limit set by the power quality norms. By controlling these har-

monic ratios, supply current THD can be brought within the ac-

ceptable limit but the power factor may deteriorate. In general,

the desired phase-a source current

set to zero, and making the order of harmonics in source current

same as that of supply voltage, may be written as

is the arbitrary angle of supply voltage andis

0 and the harmonics in cur-

with displacement angle

(3)

Similar expression can be written for other phases, i.e.,

and with, , respectively, as the RMS values of

the source current components corresponding to nth order

harmonic.

. Similarly for phases b and c,

and

, and are the admittance factors of the com-

pensating load (combination of filter and the actual load). These

are the control variables for phases a, b, and c, respectively. By

controlling the values of the admittance factors, the shape of the

current can be controlled. The reference compensating current

(

,, ) for the three phases is given by

.

(4)

respectively. In the proposed scheme, a current controlled

voltage source inverter is connected in parallel with the load as

the shunt active filter. The algorithm calculates the reference

compensating current and generates the control pulses for the

inverter using DSP. This compensating current, when injected

into the system, balances the 3-

the undesired components of the load current that are respon-

sible for the low power factor and high THD in the supply.

current and compensates for

III. OPTIMIZATION TECHNIQUE

Nonsinusoidal and unbalanced conditions result in several

problems in power systems. In such conditions, unity power

factor and power balance can be achieved by making the source

current identical in magnitude, in phase and of identical shape

as that of voltage, in all the phases. When the source current is

made to have the same shape as voltage, current THD may rise

beyond the acceptable limit. To obtain perfect harmonic com-

pensation, current drawn from the source needs to be a perfect

sine wave. However, in that case, unity power factor is not re-

alized. Hence, there is a need to optimize the power factor, sat-

isfying power demand and current harmonic limit, apart from

achieving a balanced source current in the system. The opti-

mization technique is described next.

Lagrangian-multiplier technique [12] is used to optimize the

nonlinear equation for apparent power subject to equality and

inequality constraints. A nonsinusoidal but balanced voltage

supply is considered at the point of common coupling (PCC).

A. Lagrangian-Multiplier Technique

This technique states that an augmented Lagrange function

can be constructed as

(5)

where

straint(s) and

are unknown quantities. The necessary condition for con-

strained local minima of

is that its derivatives with respect to

its variables should be zero. Since inequality constraint is also

present, Kuhn–Tucker [12] conditions must also be satisfied.

is the objective function,

represents the inequality constraint(s).

represents the equality con-

and

B. Objective Function

From (1) and (3) it is clear that after compensation the

harmonic frequencies present in the supply current and supply

voltage should be identical and the corresponding phase angles

should be zero. Let the order of harmonics present in supply

voltage and desired source current be “ .” The objective is

to minimize the apparent power [13],

phase-a, the objective function

in each phase. For

is given by

(6)

where,

Expressions for

and “c”) can be similarly written. Subsequently, optimization

is applied to minimize

, , and

, and so that the power factor is maximized,

current THD is brought within the limits and the source current

is balanced.

.

and (corresponding to phase “b”

with control variables

C. Equality Constraints

The desired source current in each phase is calculated in such

a way that, it should supply only mean value of corresponding

instantaneous real power demanded by the load after compen-

sation. The compensating circuit supplies remaining power

demanded by the load. Therefore the equality constraints for

phase—a can be written as

(7)

Similarly expressions for equality constraints for phase—b

and phase—c can be derived. The method for calcula-

tion of

is explained later in Section IV.

Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY BOMBAY. Downloaded on November 29, 2008 at 01:17 from IEEE Xplore. Restrictions apply.

Page 4

596 IEEE TRANSACTIONS ON POWER ELECTRONICS, VOL. 22, NO. 2, MARCH 2007

D. Inequality Constraints

Let the total current harmonic distortion be limited to

[14]. The inequality constraint for phase-a is given by

(8)

Thus, the inequality constraint

can be written as

(9)

Similarly, expressions for inequalityconstraints forphase—b

and phase—c can be derived.

E. Lagrange Function

The objective is to minimize

constraint and the inequality constraint given by (7) and (9), re-

spectively. Using (5), the augmented function

is given by

(6) subject to the equality

for phase-a

(10)

where

The necessary conditions for constrained local minima of

are

and are constants corresponding to phase—a.

(11)

(12)

where

monics considered

, , and is the order of har-

(13)

(14)

By solving (11)–(14),

factor within acceptable THD of current.

are the Kuhn–Tucker conditions to be satisfied for phase-a at

the relativeminimumof theobjective function correspondingto

phase-a. Using the necessary and sufficient conditions for con-

straint local minima of

, the unknowns can be determined

for phase-a. Using these values, the desired source current for

phase—a for an optimum power factor within acceptable THD

limit can be determined. Similarly, the desired source current

in phase-b and phase-c can be computed. The flowchart of the

is obtained for an optimum power

0 and0

Fig. 4. Flow chart of the proposed optimization and compensation algorithm.

complete algorithm for generating reference compensating cur-

rent is shown in Fig. 4.

The3- supplyvoltagesandcurrentsaresensedatasampling

frequency of 6.4 kHz (128 samples per cycle). Using Discrete

Fourier Transform (DFT), RMS value of harmonic components

ofthe3- supplyvoltageand current, along withtheir phasean-

gles, are determined. It must be pointed out that in the proposed

technique, the reference compensation current is computed by

assuming a constant supply frequency of 50 Hz. However, in a

practical power system, there might be a slight variation in the

frequency. For proper operation of the active filter under vari-

able supply frequency conditions, a frequency tracking system

[15] will be required and the program will have to be suitably

modified[16]totakeintoaccountthefrequencyvariations.Oth-

erwise the RMS values of voltage and current, calculated using

DFT, will not be accurate and this will result in the injection of

improper compensation current into the system. Calculation of

average power under unbalanced condition is presented in the

next section.

Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY BOMBAY. Downloaded on November 29, 2008 at 01:17 from IEEE Xplore. Restrictions apply.

Page 5

GEORGE AND AGARWAL: DSP BASED OPTIMAL ALGORITHM597

IV. POWER UNDER NONSINUSOIDAL SUPPLY VOLTAGE

AND UNBALANCED LOAD CONDITIONS

Whenthesupplyvoltageandunbalancedloadcurrentcontain

harmonics, the complex apparent power is given by the vector

sum of active, reactive and distortion power. The average active

power in the system needs to be calculated for the implementa-

tion of the algorithm of the proposed technique. In the proposed

algorithm, the average power demanded by the load is taken as

an equality constraint, i.e., the average active power supplied by

thesourceaftercompensationshouldbesameastheaverageac-

tive power demanded by the load. There are different methods

of calculating the average power demanded by the unbalanced

load.

Method-1: Using Sequence Components of Voltage and

Current: In a 3- system, the instantaneous power is given by

(15)

can also be calculated by using sequence components of

voltage and current as

(16)

where “ ,” “ ,” “0” denote positive, negative, and zero se-

quence components, respectively. Positive, negative, and zero

sequence components of power have mean values equal to

and , respectively, while their corresponding, alternating

components are

, , and

values

,

, respectively with zero mean

(17)

From (16), the average power

(18)

Thus, using sequence components of voltage and current, the

average power can be calculated.

Method-2: Power Calculation Using the RMS Values of Har-

monic Components of Voltage and Current: This method uses

RMSvaluesoftheharmoniccomponentsofthevoltageandcur-

rent to calculate the reference compensating current. It is well

known that the average power supplied by the source under har-

monic condition is due to similar harmonic components only,

where as the power supplied by dissimilar harmonic compo-

nents is zero. Using this fact, the total power consumed in a 3-

unbalancedsystemcanbecomputedanddividedequallyamong

each phase to obtain the desired source current.

Balancing of 3-

source current can be realized by sharing

the average power demand equally among each phase as shown

in Fig. 5. The active filter supplies the remaining power de-

manded by the load. It may be noted that method-2 does not re-

quire sequence component calculations. Thus, because the pro-

posed technique requires harmonic components of voltage and

current for computing the reference signal, it is easy to use

method-2. After calculating the average power, Lagrange func-

tion is formed using (10) and

unknowns

depends on the order of harmonics present in

the supply voltage.

is computed. The number of

Fig. 5. Power balance diagram for a 3-? system.

Fig. 6. Simulation waveforms: (a) supply voltage; (b) load current; (c) refer-

ence source current, and (d) compensating current.

V. SIMULATION RESULTS

To verify the performance of the proposed algorithm, the fol-

lowing cases are considered.

A) Case-1: A trapezoidal supply with voltage THD 21.8%

connected to unbalanced linear load.

B) Case-2: A nonsinusoidal supply with 10.56% voltage

THD connected to an unbalanced nonlinear load with

24.02% current THD.

A. Case-1: A Trapezoidal Supply With Voltage THD 21.8%

Connected to Unbalanced Linear Load

To verify the theory of the proposed technique under un-

balanced current conditions, simulation studies have been car-

ried out using MATLAB on a balanced three-phase, 50 Hz,

415 V(RMS) trapezoidal voltage power supply system (voltage

THD

21.8%) with an unbalanced resistive load of 30 kW.

Waveformsof nonsinusoidalsupplyvoltageconsideredfor sim-

ulation are shown in Fig. 6(a) and for unbalanced load current

are shown in Fig. 6(b). Sampling frequency used for sensing

the voltage and current is 6.4 kHz with 128 samples per cycle.

It should be noted that the supply voltage is balanced where as

the load currents are unbalanced. The desired 3-

rent, computed for 5% current THD is shown in Fig. 6(c) and

waveform of the corresponding reference compensating current

source cur-

Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY BOMBAY. Downloaded on November 29, 2008 at 01:17 from IEEE Xplore. Restrictions apply.