**2. Unified Power Quality Conditioner (UPQC)**

UPQC is composed of two inverters that are connected back to back [3-10]. One of them is connected to the grid via a parallel transformer and can compensate the current problems (PAF). Another one is connected to the grid via a series transformer and can compensate the voltage problems (SAF). These inverters are controlled for the compensation of the power quality problems instantaneously. Figure 1 shows the general schematic of a UPQC.

**Figure 1.** General schematic of a UPQC

A simple circuit model of the UPQC is shown in Figure 2. Series active filter has been modeled as the voltage source and parallel active filter has been modeled as the current source.

**Figure 2.** Circuit model of UPQC

#### **3. VFFT problem statement**

96 An Update on Power Quality

reactive power compensation.

**Figure 1.** General schematic of a UPQC

**Figure 2.** Circuit model of UPQC

source.

Second scope of this research is to use Multy Output ADAptive LINEar (MOADALINE) approach for the reference generation of UPQC. Simplicity and flexibility in extraction of different reference signals can be advantage of the proposed algorithm. Third scope of this research is reference generation of UPQC with the scope of power flow control as well as power quality compensation. In this stage, SAF is controlled by dqo approach for voltage sag, swell, unbalance, interruption, harmonic compensation and power flow control. Also, PAF is controlled by composition of dqo and Fourier theories for current harmonic and

Also for the validity of the proposed approaches, power quality compensation has been done in a test circuit via simulation. Voltage sag, swell and harmonics will be compensated by SAF of UPQC. Also, current harmonics and reactive power will be compensated by PAF of UPQC. Section 2 generally introduces UPQC and its equivalent circuit. Section 3 explains the proposed VFFT and related equations. Section 4 introduces UPQC reference generation system based on the proposed VFFT approach. Section 5 explains proposed MOADALINE algorithm for reference generation. Section 6 explains reference generation based on power

flow control. Section 7 simulates the research. Finally, section 8 concludes the results.

quality problems instantaneously. Figure 1 shows the general schematic of a UPQC.

UPQC is composed of two inverters that are connected back to back [3-10]. One of them is connected to the grid via a parallel transformer and can compensate the current problems (PAF). Another one is connected to the grid via a series transformer and can compensate the voltage problems (SAF). These inverters are controlled for the compensation of the power

A simple circuit model of the UPQC is shown in Figure 2. Series active filter has been modeled as the voltage source and parallel active filter has been modeled as the current

**2. Unified Power Quality Conditioner (UPQC)** 

Fourier transform has the capability of different order components extraction of distorted periodic voltage and current. It is possible to use voltage and current first order components for determining the compensator signals. Based on the related equations of Fourier transform, there is a need for at least one cycle data for settling down the response. This problem can cause week responsibility in dynamic condition. Proposed extended Fourier transform will be responsible for improving this problem. First order Fourier coefficients of a sinusoidal signal can be written as equations (1) and (2).

$$a\_1 = \frac{2}{2\pi} \int\_0^{2\pi} v(\alpha t) \cos(\alpha t) d\alpha t = \frac{4}{2\pi} \int\_0^{\pi} v(\alpha t) \cos(\alpha t) d\alpha t \tag{1}$$

$$b\_1 = \frac{2}{2\pi} \int\_0^{2\pi} v(\alpha t) \sin(\alpha t) d\alpha t = \frac{4}{2\pi} \int\_0^{\pi} v(\alpha t) \sin(\alpha t) d\alpha t \tag{2}$$

Based on equations (1) and (2) it is possible to reduce settling time of the Fourier transform responsibility to T/2; where, T is the main period of the signal. In this condition the responsibility speed will be increased twice but, it is not reasonable speed in dynamic condition yet. Equation (5) can be resulted from equations (3) and (4), for a sinusoidal signal with phase angle *Φ*. Equation (6) can be resulted similarly.

$$\frac{4}{2\pi} \int\_0^\pi \sin(\alpha t + \phi) \cos(\alpha t) d\alpha t = \sin \phi \tag{3}$$

$$\begin{aligned} \frac{8}{2\pi} \int\_0^{\frac{\pi}{6}} \sin(\alpha t + \phi) \cos(\alpha t) d\alpha t + \frac{8}{2\pi} \int\_{\frac{2\pi}{6}}^{\frac{3\pi}{6}} \sin(\alpha t + \phi) \cos(\alpha t) d\alpha t + \\ \frac{8}{2\pi} \int\_{\frac{4\pi}{6}}^{\frac{5\pi}{6}} \sin(\alpha t + \phi) \cos(\alpha t) d\alpha t = \sin\phi \end{aligned} \tag{4}$$

$$\begin{aligned} \frac{4}{2\pi} \int\_0^\pi \sin(\alpha t + \phi) \cos(\alpha t) d\alpha t &= \frac{8}{2\pi} \int\_0^\pi \sin(\alpha t + \phi) \cos(\alpha t) d\alpha t + \\ \frac{8}{2\pi} \int\_{\frac{5\pi}{6}}^{\frac{3\pi}{6}} \sin(\alpha t + \phi) \cos(\alpha t) d\alpha t &+ \frac{8}{2\pi} \int\_{\frac{4\pi}{6}}^{\frac{5\pi}{6}} \sin(\alpha t + \phi) \cos(\alpha t) d\alpha t = \sin\phi \end{aligned} \tag{5}$$

$$\begin{aligned} \frac{4}{2\pi} \int\_0^\pi \sin(\alpha t + \phi)\sin(\alpha t)d\alpha t &= \frac{8}{2\pi} \int\_0^\frac{\pi}{6} \sin(\alpha t + \phi)\sin(\alpha t)d\alpha t + \\ \frac{8}{2\pi} \int\_{\frac{2\pi}{6}}^{\frac{3\pi}{6}} \sin(\alpha t + \phi)\sin(\alpha t)d\alpha t + \frac{8}{2\pi} \int\_{\frac{4\pi}{6}}^{\frac{5\pi}{6}} \sin(\alpha t + \phi)\sin(\alpha t)d\alpha t &= \cos\phi \end{aligned} \tag{6}$$

Equations (7) and (8) can be rewritten from equations (5) and (6) respectively.

$$a\_1 = \frac{8}{2\pi} \int\_0^{\frac{\pi}{6}} \sin(\alpha t + \phi)\cos(\alpha t) d\alpha t + \frac{8}{2\pi} \int\_0^{\frac{\pi}{6}} (-\sin(\alpha t + \phi - 2\pi \Big/\_3))(-\cos(\alpha t - 2\pi \Big/\_3)) d\alpha t + \frac{8}{2\pi} \int\_0^{\frac{\pi}{6}} \sin(\alpha t + \phi)\cos(\alpha t) d\alpha t + \frac{8}{2\pi} \int\_0^{\frac{\pi}{6}} \sin(\alpha t + \phi)\cos(\alpha t) d\alpha t$$

$$\frac{8}{2\pi} \int\_0^{\frac{\pi}{6}} \sin(\alpha t + \phi + 2\pi \Big/\_3)\cos(\alpha t + 2\pi \Big/\_3) d\alpha t + \frac{8}{2\pi} \int\_0^{\frac{\pi}{6}} \sin(\alpha t + \phi - 2\pi \Big/\_3)\cos(\alpha t - 2\pi \Big/\_3) d\alpha t$$

Reference Generation of Custom Power Devices (CPs) 99

**Figure 3.** Proposed VFFT based control system

block diagram of the SAF control circuit.

**Figure 4.** SAF control system block diagram

**Figure 5.** Reference current determination

**4.2. Parallel active filter reference generation** 

as the reference current. This problem has been shown in Figure 5.

**4.1. Series active filter reference generation** 

Proposed approach can be used for the extraction of direct and indirect first order components of the source voltage. In this control approach, series active filter can compensate harmonics as well as voltage sag and swells. In this approach the reference voltage magnitude can be setup to the nominal value as equation (9). Figure 4, shows the

1

*a*

*b*

In this research parallel active filter have the duty of the reactive power compensation, as well as, current harmonics. For this purpose as equation (10), active first order component of load current which is tangent component of the load current to the load voltage can be used

( ) sin( arctan ) sin( ) *ref nom nom vl*

( ) cos( ) sin( ) sin( arctan )

*<sup>a</sup> vt a t b t a b t*

1

11 1 1 1

*vt v t v t*

2 2 1

 

 

1

1

(9)

*b*

6 6 1 0 0 6 6 0 0 6 0 0 8 8 2 2 sin( )sin( ) ( sin( ))( sin( )) 2 2 3 3 8 8 2 2 sin( )sin( ) sin( )sin( ) 2 2 3 3 8 8 2 2 2 2 sin( )sin( ) sin( )sin( ) 2 2 3 3 3 3 *b t td t t t dt t t dt t td t t t dt t t dt* <sup>6</sup> (8)

This solution has advantage of reducing the data window length to T/12. In this condition, settling time of the Fourier transform responsibility will be decreased to T/12. In other words, the responsibility speed will be increased twelve times. It should be noticed that this approach can be used only in balanced three phase systems. In this condition reach to the same accuracy in response is possible as compared to that of one cycle but very faster than one cycle. When data window length is chosen T sec, all of even components of distorted voltage and current in the related integral of Fourier transform can be filtered completely. But this is not possible in T/12 data window length condition. So, the problem of this approach is the unfiltered steady state oscillations in the response. This is because of small data window length. Thus, to complete the proposed approach for accessing the fast response, as well as good steady state response, proper composition of T/12 and T/2 data window lengths have been used. Completed proposed approach uses T/12 data window length in signal magnitude change instances, for accessing the fast response, and T/2 data window length in other times, for accessing the good response without oscillation [10].

#### **4. UPQC reference generation based on the VFFT**

Based on the previous indications, the detection of sag, swell, and load change conditions are essential problem for proper control of the UPQC. In this research, for the detection of sag or swell condition in the source voltage and changes in the load current, derivative of the first order component magnitude of the voltage and current signals has been compared with a constant value. This is based on the facts that in these conditions, the derivative of the signal magnitude can change rapidly with an almost increasing slope amount. Figure 3, shows the block diagram of the proposed VFFT based control approach [10].

**Figure 3.** Proposed VFFT based control system

 

 

  

 

6

6

oscillation [10].

6 6 1 0 0

 

6 6 0 0

 

 

8 8 2 2 sin( )cos( ) sin( )cos( ) 2 2 3 3

 

 

8 8 2 2 sin( )sin( ) sin( )sin( ) 2 2 3 3

 

   

 

8 8 2 2 sin( )cos( ) ( sin( ))( cos( )) 2 2 3 3

*t t dt t td t*

*a t td t t t dt*

 

 

 

8 8 2 2 2 2 sin( )cos( ) sin( )cos( ) 2 2 3 3 3 3

8 8 2 2 sin( )sin( ) ( sin( ))( sin( )) 2 2 3 3

*t t dt t td t*

*b t td t t t dt*

 

 

 

8 8 2 2 2 2 sin( )sin( ) sin( )sin( ) 2 2 3 3 3 3

*t t dt t t dt*

*t t dt t t dt*

 

 

 

This solution has advantage of reducing the data window length to T/12. In this condition, settling time of the Fourier transform responsibility will be decreased to T/12. In other words, the responsibility speed will be increased twelve times. It should be noticed that this approach can be used only in balanced three phase systems. In this condition reach to the same accuracy in response is possible as compared to that of one cycle but very faster than one cycle. When data window length is chosen T sec, all of even components of distorted voltage and current in the related integral of Fourier transform can be filtered completely. But this is not possible in T/12 data window length condition. So, the problem of this approach is the unfiltered steady state oscillations in the response. This is because of small data window length. Thus, to complete the proposed approach for accessing the fast response, as well as good steady state response, proper composition of T/12 and T/2 data window lengths have been used. Completed proposed approach uses T/12 data window length in signal magnitude change instances, for accessing the fast response, and T/2 data window length in other times, for accessing the good response without

Based on the previous indications, the detection of sag, swell, and load change conditions are essential problem for proper control of the UPQC. In this research, for the detection of sag or swell condition in the source voltage and changes in the load current, derivative of the first order component magnitude of the voltage and current signals has been compared with a constant value. This is based on the facts that in these conditions, the derivative of the signal magnitude can change rapidly with an almost increasing slope amount. Figure 3,

shows the block diagram of the proposed VFFT based control approach [10].

 

 

 

 

 

   

 

 

 

 

 

> 

   

 

> 

   

  (7)

(8)

 

 

 

0 0

6 6 1 0 0

 

6 6 0 0

 

 

0 0

**4. UPQC reference generation based on the VFFT** 

<sup>6</sup>

<sup>6</sup>

#### **4.1. Series active filter reference generation**

Proposed approach can be used for the extraction of direct and indirect first order components of the source voltage. In this control approach, series active filter can compensate harmonics as well as voltage sag and swells. In this approach the reference voltage magnitude can be setup to the nominal value as equation (9). Figure 4, shows the block diagram of the SAF control circuit.

$$\begin{aligned} \upsilon\_1(t) &= a\_1 \cos(\alpha t) + b\_1 \sin(\alpha t) = \sqrt{a\_1^2 + b\_1^2} \sin(\alpha t + \arctan \frac{a\_1}{b\_1}) \\\\ \upsilon\_{ref}(t) &= \upsilon\_{nom} \sin(\alpha t + \arctan \frac{a\_1}{b\_1}) = \upsilon\_{nom} \sin(\alpha t + \phi\_{v1}) \\\\ &\quad \boxed{\text{Prand}} \text{ } \text{ } \text{Mag} \end{aligned} \tag{9}$$

**Figure 4.** SAF control system block diagram

#### **4.2. Parallel active filter reference generation**

In this research parallel active filter have the duty of the reactive power compensation, as well as, current harmonics. For this purpose as equation (10), active first order component of load current which is tangent component of the load current to the load voltage can be used as the reference current. This problem has been shown in Figure 5.

**Figure 5.** Reference current determination

$$I\_{ref}(t) = I\_{l1} \cos(\phi\_{v11} - \phi\_{l11}) \sin(\alpha t + \phi\_{v11}) \tag{10}$$

Reference Generation of Custom Power Devices (CPs) 101

(14)

0

*w t*

*w t*

1

1

*m*

a1


b1

*w t*

2/(m-1) -

2/(m-1)

(13)

(15)

(16)

*m m*

 

 

 

01 1 01 1

1 1 ... 1 22 2

> 0 1

( ) ( ) ... ( ) *<sup>m</sup>*

*w t w t*

*w t*

1

0 1

0 1

( ) 2 2

+

+

 

 

 

( ) cos( ) ... cos( ) <sup>2</sup> ( ) sin( ) ... sin( ) <sup>1</sup> ... 1 ... 1

Park transform which is used for the conversion of abc to dqo frame, is useful in the steady state and dynamic analysis of electrical systems [3]. Conversion matrix and related

Weighted Factors Calculation

2 2 2sin( ) 2sin( ) 2sin( ) 3 3

*tt t v v v v t t t v Tv v v v*

*d a a q b b c c o*

 

> 

 

 

1 22 2cos( ) 2cos( ) 2cos( ) 3 33 11 1

*nt nt nt*

cos( ) cos( ) ... cos( ) <sup>2</sup> ( ) sin( ) sin( ) ... sin( ) <sup>1</sup>

*S t nt nt nt*

*W*

*n m n m*

*a n t n t*

*b n t n t*

*m*

0

cos(wt0) sin(wt0) cos(wt1) sin(wt1)

coswt(m-1) sinwt(m-1)

*a*

*m*

W0 W0 W1 W1

**Figure 7.** Block diagram of the proposed MOADALINE approach

W(m-1) W(m-1)

equations have been shown in Equations (16) and (17).

**6. Reference generation based on power flow control** 

Where, *Il1* and *Φil1* are the first order component magnitude and phase angle of the load current, respectively and *Φvl1* is the first order component phase angle of the load voltage. Figure 6, shows the block diagram of the PAF control circuit.

**Figure 6.** Block diagram of the PAF control circuit

#### **5. Reference generation based on MOADALINE approach**

Based on MOADLINE approach each *n*1 signal of y can be written as a weighted linear combination of its components. If S(t) be *n m* component matrix of y at time t and W(t) be *m*1 vector of weighted coefficient then, the signal of y can be written as equation (11). MOADALINE can be used for determining weight vector of W which generates a special signal of y from its components [11]. Weighted factors can be updated in each stage of an adaptation approach for extraction of a desired signal. Equation (11) shows adaptation rule that is based on Least Mean Square (LMS) algorithm.

$$\begin{aligned} y &= \mathcal{S}\mathcal{W} \\ \mathcal{W}(t+dt) &= \mathcal{W}(t) + k\mathcal{S}^T(t)[\mathcal{S}(t)\mathcal{S}^T(t)]^{-1}\boldsymbol{\varepsilon}(t) \end{aligned} \tag{11}$$

Where, e(t) is the error between desired and actual signal of y, and K is the convergence factor. It is possible to extract the reference voltage and current from uncompensated source voltage and load current. Fourier coefficients can be determined as vector of y. Reference signal can be determined as W. Matrix of S is constant. After determination of uncompensated signal Fourier coefficients, they can be compared with the desired values. Error signal can be used in adaptation rule for updating the vector of W. Therefore reference voltage and current can be determined. Figure 7, shows block diagram of the proposed MOADALINE approach [11].

$$\begin{aligned} \mathbf{y} &= \begin{bmatrix} a\_n \\ b\_n \\ a\_0 \end{bmatrix} \end{aligned} \tag{12}$$

#### Reference Generation of Custom Power Devices (CPs) 101

$$S(t) = \frac{2}{m - 1} \begin{bmatrix} \cos(nwt\_0) & \cos(nwt\_1) & \dots & \cos(nwt\_{n-1}) \\ \sin(nwt\_0) & \sin(nwt\_1) & \dots & \sin(nwt\_{n-1}) \\ \vdots & & \vdots \\ \end{bmatrix} \tag{13}$$

$$W = \begin{bmatrix} w(t\_0) \\ w(t\_1) \\ \vdots \\ w(t\_{n-1}) \end{bmatrix} \tag{14}$$

$$\begin{bmatrix} a\_n \\ a\_n \\ a\_0 \end{bmatrix} = \frac{2}{m - 1} \begin{bmatrix} \cos(nwt\_0) & \dots & \cos(nwt\_{n-1}) \\ \sin(nwt\_0) & \dots & \sin(nwt\_{n-1}) \\ \vdots & & \vdots \\ \end{bmatrix} \begin{bmatrix} w(t\_0) \\ w(t\_1) \\ \vdots \\ w(t\_{n-1}) \end{bmatrix} \tag{15}$$

$$\begin{aligned} \cos(nwt\_0) & \dots & \cos(nwt\_{n-1}) \\ \vdots & & \vdots \\ \cos(nwt\_0) & \dots & \cos(nwt\_{n-1}) \\ \end{bmatrix} \tag{16}$$

$$\begin{aligned} \cos(nwt\_0) & \dots & \cos(nwt\_0) \\ \vdots & & \vdots \\ \cos(nwt\_0) & \dots & \cos(nwt\_{n-1}) \\ \end{bmatrix} \tag{17}$$

$$\begin{aligned} \cos(nwt\_0) & \quad \cos(nwt\_0) \\ \vdots & & \vdots \\ \cos(nwt\_0) & \dots & \cos(nwt\_{n-1}) \\ \end{bmatrix} \tag{18}$$

**Figure 7.** Block diagram of the proposed MOADALINE approach

100 An Update on Power Quality

1 11 1 ( ) cos( )sin( ) *ref l vl il vl ItI* 

Where, *Il1* and *Φil1* are the first order component magnitude and phase angle of the load current, respectively and *Φvl1* is the first order component phase angle of the load voltage.

Based on MOADLINE approach each *n*1 signal of y can be written as a weighted linear combination of its components. If S(t) be *n m* component matrix of y at time t and W(t) be *m*1 vector of weighted coefficient then, the signal of y can be written as equation (11). MOADALINE can be used for determining weight vector of W which generates a special signal of y from its components [11]. Weighted factors can be updated in each stage of an adaptation approach for extraction of a desired signal. Equation (11) shows adaptation rule

<sup>1</sup> ( ) ( ) ( )[ ( ) ( )] ( ) *T T*

(11)

(12)

*W t dt W t kS t S t S t e t*

Where, e(t) is the error between desired and actual signal of y, and K is the convergence factor. It is possible to extract the reference voltage and current from uncompensated source voltage and load current. Fourier coefficients can be determined as vector of y. Reference signal can be determined as W. Matrix of S is constant. After determination of uncompensated signal Fourier coefficients, they can be compared with the desired values. Error signal can be used in adaptation rule for updating the vector of W. Therefore reference voltage and current can be determined. Figure 7, shows block diagram of the proposed

0

*n n a y b a* 

Figure 6, shows the block diagram of the PAF control circuit.

**5. Reference generation based on MOADALINE approach** 

**Figure 6.** Block diagram of the PAF control circuit

that is based on Least Mean Square (LMS) algorithm.

MOADALINE approach [11].

*y SW*

 

*t*(10)

#### **6. Reference generation based on power flow control**

Park transform which is used for the conversion of abc to dqo frame, is useful in the steady state and dynamic analysis of electrical systems [3]. Conversion matrix and related equations have been shown in Equations (16) and (17).

Calculation

$$
\begin{bmatrix} v\_d \\ v\_q \\ v\_o \end{bmatrix} = \frac{1}{3} \begin{bmatrix} 2\sin(\alpha t) & 2\sin(\alpha t - \frac{2\pi}{3}) & 2\sin(\alpha t + \frac{2\pi}{3}) \\ 2\cos(\alpha t) & 2\cos(\alpha t - \frac{2\pi}{3}) & 2\cos(\alpha t + \frac{2\pi}{3}) \\ 1 & 1 & 1 \end{bmatrix} \begin{bmatrix} v\_a \\ v\_b \\ v\_c \end{bmatrix} = \overline{T} \begin{bmatrix} v\_a \\ v\_b \\ v\_c \end{bmatrix} \tag{16}
$$

$$
\begin{bmatrix} \boldsymbol{v}\_a \\ \boldsymbol{v}\_b \\ \boldsymbol{v}\_c \end{bmatrix} = \overline{\boldsymbol{T}^{-1}} \begin{bmatrix} \boldsymbol{v}\_d \\ \boldsymbol{v}\_q \\ \boldsymbol{v}\_o \end{bmatrix} \tag{17}
$$

Reference Generation of Custom Power Devices (CPs) 103

Where, *Vref* and *Vsetup* are the nominal voltage magnitude and extracted voltage

For the investigation of the validity of the proposed VFFT reference generation strategy in power quality compensation of a distribution system, simulation of the test circuit of Figure 9, has been done in MATLAB/SIMULINK software. Source voltage and load current, have been measured and analyzed in the proposed control system for the determination of the

 This power system consists of a three phase 380V (RMS, L-L), 50 Hz utility, two three phase linear R-L load and a three phase rectifier as a nonlinear load which can be connected to the circuit at different times. This is for the investigation of the proposed control system capability in dynamic conditions. For the investigation of the voltage sag and swell conditions, utility voltages have 0.25 percent sag between 0.04 sec and 0.08 sec and 0.25 percent swell between 0.08 sec and 0.12 sec. Also, for the investigation of the proposed control strategy in the harmonic conditions, source voltage has been harmonized between

Figure 8, shows the block diagram of the proposed control circuit.

**Figure 8.** Block diagram of the voltage control circuit

**7.1. Results of VFFT approach** 

compensator signals of SAF and PAF.

**Figure 9.** General test system circuit

magnitude, respectively.

**7. Results** 

Instantaneous active and reactive powers in dqo axis can be written as Equations (18) and (19).

$$P = \frac{3}{2} (\upsilon\_d i\_d + \upsilon\_q i\_q + 2\upsilon\_0 i\_0) \tag{18}$$

$$\mathcal{Q} = \frac{\mathcal{B}}{2} (\upsilon\_q i\_d - \upsilon\_d i\_q) \tag{19}$$

Equations (20) and (21) show direct and quadratic axis voltages based on P and Q that have been determined from equations (18) and (19). It should be noticed that the active and reactive powers in equations (20) and (21) are transmitted powers after series active filter toward the load. These equations show that in constant impedance loads there is a relation between voltage and transmitted power. In other words, a particular load voltage is needed for a particular load power and vice versa. In equations (20) and (21) it have been assumed that the voltages are balanced and 0 *v* 0 .

$$w\_d = \frac{2}{3} (\frac{\dot{P}i\_d - \mathbb{Q}i\_q}{i\_d^2 + i\_q^2}) \tag{20}$$

$$w\_q = \frac{2}{3} (\frac{\text{Pi}\_q + \text{Qi}\_d}{\text{i}\_d^{\text{-}2} + \text{i}\_q^{\text{-}2}}) \tag{21}$$

Therefore, setup transmission active and reactive powers in equations (20) and (21) in considered amounts will result the related load voltage magnitude and phase angle. In reactive power compensated condition, Q=0 and the amount of active power will be extracted from the above equations as equation (22).

$$P = \frac{3}{2} \sqrt{(\upsilon\_d^{'2} + \upsilon\_q^{'2})(i\_d^{'2} + i\_q^{'2})} \tag{22}$$

Generally, in this approach nominal active and reactive powers of load will be substituted in equation (20) and (21) for reference voltage extraction. But, there is a problem. If we don't have load nominal power data, extracted reference voltage will not have nominal magnitude. For correct arrangement of the voltage magnitude, a PI controller is used for minimum error between magnitudes of extracted reference voltage and the nominal voltage.

$$P\_{error} = k\_p (V\_{setup} - V\_{ref}) + k\_i \int (V\_{setup} - V\_{ref}) dt \tag{23}$$

Where, *Vref* and *Vsetup* are the nominal voltage magnitude and extracted voltage magnitude, respectively.

Figure 8, shows the block diagram of the proposed control circuit.

**Figure 8.** Block diagram of the voltage control circuit

#### **7. Results**

102 An Update on Power Quality

that the voltages are balanced and 0 *v* 0 .

extracted from the above equations as equation (22).

(19).

voltage.

1 *a d b q c o*

(17)

 

Instantaneous active and reactive powers in dqo axis can be written as Equations (18) and

<sup>3</sup> ( 2)

<sup>3</sup> ( )

2 2 <sup>2</sup> ( )

2 2 <sup>2</sup> ( )

*d q*

*i i*

Therefore, setup transmission active and reactive powers in equations (20) and (21) in considered amounts will result the related load voltage magnitude and phase angle. In reactive power compensated condition, Q=0 and the amount of active power will be

Generally, in this approach nominal active and reactive powers of load will be substituted in equation (20) and (21) for reference voltage extraction. But, there is a problem. If we don't have load nominal power data, extracted reference voltage will not have nominal magnitude. For correct arrangement of the voltage magnitude, a PI controller is used for minimum error between magnitudes of extracted reference voltage and the nominal

*q d*

*d q*

*i i*

*Pi Qi*

*d q*

*Pi Qi*

3

3

*d*

*q*

*v*

*v*

Equations (20) and (21) show direct and quadratic axis voltages based on P and Q that have been determined from equations (18) and (19). It should be noticed that the active and reactive powers in equations (20) and (21) are transmitted powers after series active filter toward the load. These equations show that in constant impedance loads there is a relation between voltage and transmitted power. In other words, a particular load voltage is needed for a particular load power and vice versa. In equations (20) and (21) it have been assumed

0 0

<sup>2</sup> *dd qq P vi vi vi* (18)

<sup>2</sup> *Q vi vi qd dq* (19)

(20)

(21)

<sup>3</sup> 2 2 22 ( )( ) <sup>2</sup> *d qd q P v vi i* (22)

( )( ) *error p setup ref i setup ref P k V V k V V dt* (23)

*v v vTv v v*

#### **7.1. Results of VFFT approach**

For the investigation of the validity of the proposed VFFT reference generation strategy in power quality compensation of a distribution system, simulation of the test circuit of Figure 9, has been done in MATLAB/SIMULINK software. Source voltage and load current, have been measured and analyzed in the proposed control system for the determination of the compensator signals of SAF and PAF.

**Figure 9.** General test system circuit

 This power system consists of a three phase 380V (RMS, L-L), 50 Hz utility, two three phase linear R-L load and a three phase rectifier as a nonlinear load which can be connected to the circuit at different times. This is for the investigation of the proposed control system capability in dynamic conditions. For the investigation of the voltage sag and swell conditions, utility voltages have 0.25 percent sag between 0.04 sec and 0.08 sec and 0.25 percent swell between 0.08 sec and 0.12 sec. Also, for the investigation of the proposed control strategy in the harmonic conditions, source voltage has been harmonized between

0.17 sec and 0.4 sec. Table 1, shows the utility voltage data and Table 2, shows the load powers and related switching times. In this study series active filter has been connected to the circuit at time zero. But parallel active filter has been connected to the circuit at time 0.25 sec. A number of selected simulation results will be shown later.

Reference Generation of Custom Power Devices (CPs) 105

by the proposed composition of T/2 and T/12 data windows. Figure 24 and 25 show the source side and load side voltages frequency spectrum, respectively. Finally Figures 26 and 27 show the load side and source side currents frequency spectrum, respectively. Table 3 shows THDs of the source and load voltages and currents. Load voltage and source current

<sup>0</sup> 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 -400

<sup>0</sup> 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 -150

Time (Sec)

Time (Sec)

**Figure 11.** Load side voltage (sag and swell as well as harmonics have been compensated)

Amplitude (A)

Amplitude (A)

Amplitude (V)

Voltage (V)

Voltage (V)

**Figure 12.** Compensator voltage (this is only between sag, swell, and harmonic times)

**Figure 13.** Extracted source side voltage magnitude (in this state data window length is *T* and settling

<sup>0</sup> 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 <sup>0</sup>

Time (Sec)

**Figure 14.** Extracted source side voltage magnitude (in this state data window length is T/2 and settling

<sup>0</sup> 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 <sup>0</sup>

Time (Sec)

**Figure 15.** Extracted source side voltage magnitude by T/12 data window (in this state settling time is

<sup>0</sup> 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 <sup>0</sup>

Time (Sec)

0.00166 sec but, there are unfiltered oscillations in the response)

harmonics have been compensated satisfactory.

time is 0.02 sec)

time is 0.01 sec)


**Table 1.** Utility voltage harmonic and sequence parameters data


**Table 2.** Load powers and related switching times data

Figure 10, shows the source side voltage of phase 1. Figure 11 shows the compensated load side voltage of phase 1. Figure 12 shows SAF voltage of phase 1. Figure 13 and 14 shows first order component magnitude of the source voltage extracted by T and T/2 data windows respectively. Figure 15 shows first order component magnitude of the source voltage extracted by T/12 data window. Figure 16 shows the first order component magnitude of the source voltage extracted by the proposed composition of T/2 and T/12 data windows. Figure 17 shows the load side current of phase 1. Figure 18 shows the source side current of phase

**Figure 10.** Source side voltage of phase 1 (sag has been occurred between 0.04 sec and 0.08 sec and swell has been occurred between 0.08 sec and 0.12 sec. Also, harmonics have been concluded between 0.17 sec to 0.4 sec)

1. Figure 19 shows the PAF current of phase 1. Figure 20 and 21 show first order component magnitude of the load current extracted by T and T/2 data windows respectively. Figure 22 shows the first order component magnitude of the load current extracted by T/12 data window. Figure 23 shows the first order component magnitude of the load current extracted by the proposed composition of T/2 and T/12 data windows. Figure 24 and 25 show the source side and load side voltages frequency spectrum, respectively. Finally Figures 26 and 27 show the load side and source side currents frequency spectrum, respectively. Table 3 shows THDs of the source and load voltages and currents. Load voltage and source current harmonics have been compensated satisfactory.

Time (Sec)

**Figure 11.** Load side voltage (sag and swell as well as harmonics have been compensated)

104 An Update on Power Quality

0.17 sec and 0.4 sec. Table 1, shows the utility voltage data and Table 2, shows the load powers and related switching times. In this study series active filter has been connected to the circuit at time zero. But parallel active filter has been connected to the circuit at time 0.25

Voltage Order Magnitude (pu) Phase Angle (deg) Time (sec)

Linear 10 380V 0 Linear 10 380V 0.29 Non linear 5 380V 0.33

Figure 10, shows the source side voltage of phase 1. Figure 11 shows the compensated load side voltage of phase 1. Figure 12 shows SAF voltage of phase 1. Figure 13 and 14 shows first order component magnitude of the source voltage extracted by T and T/2 data windows respectively. Figure 15 shows first order component magnitude of the source voltage extracted by T/12 data window. Figure 16 shows the first order component magnitude of the source voltage extracted by the proposed composition of T/2 and T/12 data windows. Figure 17 shows the load side current of phase 1. Figure 18 shows the source side current of phase

**Figure 10.** Source side voltage of phase 1 (sag has been occurred between 0.04 sec and 0.08 sec and swell has been occurred between 0.08 sec and 0.12 sec. Also, harmonics have been concluded between

Voltage (V)

1. Figure 19 shows the PAF current of phase 1. Figure 20 and 21 show first order component magnitude of the load current extracted by T and T/2 data windows respectively. Figure 22 shows the first order component magnitude of the load current extracted by T/12 data window. Figure 23 shows the first order component magnitude of the load current extracted

<sup>0</sup> 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 -400

Time (Sec)

1 1 0 0-0.04, 0.12-0.4 1 0.75 0 0.04-0.08 1 1.25 0 0.08-0.12 5 0.1 -45 0.17-0.4 3 0.1 0 0.17-0.4

> Nominal Voltage (RMS, L-L)

Switching Time (Sec)

sec. A number of selected simulation results will be shown later.

**Table 1.** Utility voltage harmonic and sequence parameters data

(kVA)

**Table 2.** Load powers and related switching times data

Load Nominal Power

0.17 sec to 0.4 sec)

**Figure 12.** Compensator voltage (this is only between sag, swell, and harmonic times)

Amplitude (V)


**Figure 13.** Extracted source side voltage magnitude (in this state data window length is *T* and settling time is 0.02 sec)

**Figure 14.** Extracted source side voltage magnitude (in this state data window length is T/2 and settling time is 0.01 sec) Time (Sec)


**Figure 15.** Extracted source side voltage magnitude by T/12 data window (in this state settling time is 0.00166 sec but, there are unfiltered oscillations in the response)

Reference Generation of Custom Power Devices (CPs) 107

**Figure 21.** Extracted load side current magnitude (in this state data window length is T/2 and settling

Amplitude (A)

Amplitude (A)

Amplitude (A)

0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 <sup>0</sup>

Time (Sec)

**Figure 22.** Extracted load side current magnitude by T/12 data window (in this state settling time is

0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 <sup>0</sup>

Time (Sec)

**Figure 23.** Extracted load side current magnitude by the proposed approach (in this state composition of T/2 and T/12 data windows have been used, settling time is 0.00166 sec and there is no oscillation in

<sup>50</sup> <sup>100</sup> <sup>150</sup> <sup>200</sup> <sup>250</sup> <sup>300</sup> <sup>350</sup> <sup>400</sup> <sup>450</sup> <sup>500</sup> <sup>550</sup> <sup>0</sup>

<sup>50</sup> <sup>100</sup> <sup>150</sup> <sup>200</sup> <sup>250</sup> <sup>300</sup> <sup>350</sup> <sup>400</sup> <sup>450</sup> <sup>500</sup> <sup>550</sup> <sup>0</sup>

Frequency (Hz)

Frequency (Hz)

0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 <sup>0</sup>

Time (Sec)

**Figure 24.** Source voltage harmonic spectrum (it has third and fifth harmonics)

Amplitude (V)

**Figure 25.** Load voltage harmonic spectrum (harmonics have been compensated)

Amplitude (V)

0.00166 sec but there are unfiltered oscillations in the response)

time is 0.01 sec)

the response)

Amplitude (V)

Time (Sec)

**Figure 16.** Extracted source side voltage magnitude by the proposed approach (in this state composition of T/2 and T/12 data windows have been used, settling time is 0.00166 sec and there is no oscillation in the response)

**Figure 17.** Load side current (there is a linear three phase load until 0.29 sec, another linear three phase load has been connected to the circuit at time 0.29 sec and finally a nonlinear rectifier load has been connected to the circuit at time 0.33 sec)

Time (Sec)

**Figure 18.** Source side current (load current harmonics as well as reactive power have been compensated)

Time (Sec)

**Figure 19.** Compensator current (it is for reactive power compensation as well as current harmonics)

Time (Sec)

**Figure 20.** Extracted load side current magnitude (in this state data window length is *T* and settling time is 0.02 sec)

Time (Sec)

106 An Update on Power Quality

oscillation in the response)

connected to the circuit at time 0.33 sec)

compensated)

time is 0.02 sec)

**Figure 16.** Extracted source side voltage magnitude by the proposed approach (in this state


Amplitude (A)

Current (A)

Current (A)

Current (A)

Amplitude (V)

composition of T/2 and T/12 data windows have been used, settling time is 0.00166 sec and there is no

<sup>0</sup> 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.2 0.21 0.22 0.23 0.24 0.25 <sup>0</sup>

Time (Sec)

**Figure 17.** Load side current (there is a linear three phase load until 0.29 sec, another linear three phase load has been connected to the circuit at time 0.29 sec and finally a nonlinear rectifier load has been

0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 -80

Time (Sec)

0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 -80

Time (Sec)

**Figure 18.** Source side current (load current harmonics as well as reactive power have been

**Figure 19.** Compensator current (it is for reactive power compensation as well as current harmonics)

0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 -20

Time (Sec)

**Figure 20.** Extracted load side current magnitude (in this state data window length is *T* and settling

0.25 0.26 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 0.35 0.36 0.37 0.38 0.39 0.4 <sup>0</sup>

Time (Sec)

**Figure 21.** Extracted load side current magnitude (in this state data window length is T/2 and settling time is 0.01 sec)

Time (Sec)

**Figure 22.** Extracted load side current magnitude by T/12 data window (in this state settling time is 0.00166 sec but there are unfiltered oscillations in the response)


Time (Sec)

**Figure 23.** Extracted load side current magnitude by the proposed approach (in this state composition of T/2 and T/12 data windows have been used, settling time is 0.00166 sec and there is no oscillation in the response)


**Figure 24.** Source voltage harmonic spectrum (it has third and fifth harmonics)


Frequency (Hz)

**Figure 25.** Load voltage harmonic spectrum (harmonics have been compensated)


Reference Generation of Custom Power Devices (CPs) 109

current of phase 1. Load voltage and source current harmonics have been compensated

satisfactory.

**Figure 28.** Source side voltage of phase 1

**Figure 29.** Compensator voltage of phase 1

**Figure 30.** Load side voltage of phase 1

**Figure 26.** Load side current harmonic spectrum


**Figure 27.** Source side current harmonic spectrum


**Table 3.** Total Harmonic Distortion (THD)

#### **7.2. Results of MOADALINE approach**

For the investigation of the validity of the mentioned control strategy of MOADALINE for power quality compensation of a distribution system, simulation of the test circuit has been done in MATLAB software. Source current and load voltage have been measured and analyzed in the proposed control system for the determination of the compensator signals of SAF and PAF. Related equations of the controlled system have been compiled in MATLAB software via M-file. Desired values of *na* and *nb* are determined in the proposed algorithm for extraction of the reference signals.

The power system consists of a harmonized and unbalanced three phase 380V (RMS, L-L), 50 Hz utility, a three phase rectifier as a nonlinear load, a three phase balanced R-L load which is connected to the circuit at 0.04 sec and a one phase load which is connected to the circuit at 0.07 sec.

For the investigation of the voltage harmonic condition, utility voltages have harmonic and negative sequence components between 0.03 sec and 0.1 sec. Also, for the investigation of the proposed control strategy in unbalance condition, magnitude of the first phase voltage is increased to the 1.25 pu between 0.02 sec and 0.04 sec and decreased to the 0.75 pu between 0.06 sec to 0.08 sec. Figure 28 shows the source side voltage of phase 1. Figure 29, shows the compensator voltage of phase 1. Figure 30, shows load side voltage of phase 1. Figure 31, shows the load side current of phase 1. Figure 32, shows the reactive current of phase 1. Figure 33, shows the harmonic current of phase 1. Finally Figure 34, shows the source side current of phase 1. Load voltage and source current harmonics have been compensated satisfactory.

**Figure 28.** Source side voltage of phase 1

108 An Update on Power Quality

**Figure 26.** Load side current harmonic spectrum

**Figure 27.** Source side current harmonic spectrum

**Table 3.** Total Harmonic Distortion (THD)

for extraction of the reference signals.

circuit at 0.07 sec.

**7.2. Results of MOADALINE approach** 

VS THD IL THD VL THD IS THD 0.14 0.09 .0002 .0001

<sup>0</sup> <sup>100</sup> <sup>200</sup> <sup>300</sup> <sup>400</sup> <sup>500</sup> <sup>600</sup> <sup>700</sup> <sup>800</sup> <sup>900</sup> <sup>1000</sup> <sup>0</sup>

Frequency (Hz)

<sup>0</sup> <sup>100</sup> <sup>200</sup> <sup>300</sup> <sup>400</sup> <sup>500</sup> <sup>600</sup> <sup>700</sup> <sup>800</sup> <sup>900</sup> <sup>1000</sup> <sup>0</sup>

Frequency (Hz)

Amplitude (A)

Amplitude (A)

For the investigation of the validity of the mentioned control strategy of MOADALINE for power quality compensation of a distribution system, simulation of the test circuit has been done in MATLAB software. Source current and load voltage have been measured and analyzed in the proposed control system for the determination of the compensator signals of SAF and PAF. Related equations of the controlled system have been compiled in MATLAB software via M-file. Desired values of *na* and *nb* are determined in the proposed algorithm

The power system consists of a harmonized and unbalanced three phase 380V (RMS, L-L), 50 Hz utility, a three phase rectifier as a nonlinear load, a three phase balanced R-L load which is connected to the circuit at 0.04 sec and a one phase load which is connected to the

For the investigation of the voltage harmonic condition, utility voltages have harmonic and negative sequence components between 0.03 sec and 0.1 sec. Also, for the investigation of the proposed control strategy in unbalance condition, magnitude of the first phase voltage is increased to the 1.25 pu between 0.02 sec and 0.04 sec and decreased to the 0.75 pu between 0.06 sec to 0.08 sec. Figure 28 shows the source side voltage of phase 1. Figure 29, shows the compensator voltage of phase 1. Figure 30, shows load side voltage of phase 1. Figure 31, shows the load side current of phase 1. Figure 32, shows the reactive current of phase 1. Figure 33, shows the harmonic current of phase 1. Finally Figure 34, shows the source side

**Figure 29.** Compensator voltage of phase 1

**Figure 30.** Load side voltage of phase 1

Reference Generation of Custom Power Devices (CPs) 111

**Figure 34.** Source side current of phase 1

**7.3. Results of power flow control** 

**Figure 35.** General test system circuit

simulation results have been shown next.

Voltage order

**Table 4.** Utility voltage harmonic and sequence parameters data

system, simulation of the test circuit of Figure 35 has been done.

For the investigation of the validity of the power flow control strategy in a distribution

This power system consists of a harmonized and unbalanced three phase 20 kV (RMS, L-L), 50 Hz utility, a three phase balanced R-L load and a nonlinear three phase load. For the investigation of the voltage harmonic condition, utility voltages have harmonic and negative sequence components between 0.15 s and 0.35 s. Also, for the investigation of the proposed control strategy in unbalance condition, magnitude of the first phase voltage is increased to the 1.25 pu between 0.10 s and 0.20 s and decreased to the 0.75 pu between 0.3 s to 0.4 s. Investigation of the control circuit performance in fault condition is done by a three phase fault in output terminal of the main source between 0.4 s to 0.5 s. Table 4 shows the utility voltage harmonic and sequence parameters data and Table 5 shows the load power and voltage parameters. Table 6 show states of switches of 1*s* and 2*s* . A number of selected

Sequence Magnitude

(pu)

5 + 0.12 -45 0.15-0.35 3 - 0.1 0 0.15-0.35

Phase angle (degree)

Time duration (sec)

**Figure 31.** Load side current of phase 1

**Figure 32.** Reactive current of phase 1

**Figure 33.** Harmonic current of phase 1

**Figure 34.** Source side current of phase 1

**Figure 31.** Load side current of phase 1

**Figure 32.** Reactive current of phase 1

**Figure 33.** Harmonic current of phase 1

#### **7.3. Results of power flow control**

For the investigation of the validity of the power flow control strategy in a distribution system, simulation of the test circuit of Figure 35 has been done.

**Figure 35.** General test system circuit

This power system consists of a harmonized and unbalanced three phase 20 kV (RMS, L-L), 50 Hz utility, a three phase balanced R-L load and a nonlinear three phase load. For the investigation of the voltage harmonic condition, utility voltages have harmonic and negative sequence components between 0.15 s and 0.35 s. Also, for the investigation of the proposed control strategy in unbalance condition, magnitude of the first phase voltage is increased to the 1.25 pu between 0.10 s and 0.20 s and decreased to the 0.75 pu between 0.3 s to 0.4 s. Investigation of the control circuit performance in fault condition is done by a three phase fault in output terminal of the main source between 0.4 s to 0.5 s. Table 4 shows the utility voltage harmonic and sequence parameters data and Table 5 shows the load power and voltage parameters. Table 6 show states of switches of 1*s* and 2*s* . A number of selected simulation results have been shown next.


**Table 4.** Utility voltage harmonic and sequence parameters data


Reference Generation of Custom Power Devices (CPs) 113

**Figure 37.** Compensator voltage of phase 1 (compensator voltage has been determined for the sag,

**Figure 38.** Load side voltage of phase 1 (swell, sag, positive and negative harmonic sequences have

**Figure 39.** Load side current of phase 1 (it has different order harmonics. It should be considered that this current has been calculated after the voltage compensation, so the voltage unbalance has not been

been improved. Load voltage has been compensated in the fault condition)

concluded in the current)

swell, interruption, negative sequence and harmonics improvement)

**Table 5.** Load power and voltage parameters data


**Table 6.** States of switches

Figure 36, shows the source side voltage of phase 1. Figure 37, shows the compensator voltage of phase 1. Figure 38, shows the load side voltage of phase 1. Figure 39, shows the load side current of phase 1. Figure 40, shows the compensator current of phase 1. Figure 41, shows the source side current of phase 1. Figure 42, shows the load active and reactive powers. Figure 43, shows generation PAF active and reactive powers. Figure 44, shows the consumption active and reactive powers of the series active filter. Figure 45, shows generation active and reactive powers of the source. Figure 46, shows the difference between load voltage magnitude and nominal value and finally Figure 47, shows the difference between load voltage and source voltage phases.

**Figure 36.** Source side voltage of phase 1 (a swell has been occurred between 0.1 and 0.2 sec and a sag has been occurred between 0.3 and 0.4 sec. Also positive and negative harmonic sequences have been concluded between 0.15 and 0.35 sec. It has been tripped between 0.4 and 0.5 sec)

**Table 6.** States of switches

Load Nominal

First strategy

**Table 5.** Load power and voltage parameters data

between load voltage and source voltage phases.

power (kVA)

Linear 50 20 kV Non linear 260 20 kV

switch 0<t<0.4 sec 0.4<t<0.5 sec

Second strategy

<sup>1</sup>*s* close close open open <sup>2</sup>*s* open open close close

Figure 36, shows the source side voltage of phase 1. Figure 37, shows the compensator voltage of phase 1. Figure 38, shows the load side voltage of phase 1. Figure 39, shows the load side current of phase 1. Figure 40, shows the compensator current of phase 1. Figure 41, shows the source side current of phase 1. Figure 42, shows the load active and reactive powers. Figure 43, shows generation PAF active and reactive powers. Figure 44, shows the consumption active and reactive powers of the series active filter. Figure 45, shows generation active and reactive powers of the source. Figure 46, shows the difference between load voltage magnitude and nominal value and finally Figure 47, shows the difference

**Figure 36.** Source side voltage of phase 1 (a swell has been occurred between 0.1 and 0.2 sec and a sag has been occurred between 0.3 and 0.4 sec. Also positive and negative harmonic sequences have been

concluded between 0.15 and 0.35 sec. It has been tripped between 0.4 and 0.5 sec)

First strategy

Nominal voltage (RMS, L-L)

> Second strategy

**Figure 37.** Compensator voltage of phase 1 (compensator voltage has been determined for the sag, swell, interruption, negative sequence and harmonics improvement)

**Figure 38.** Load side voltage of phase 1 (swell, sag, positive and negative harmonic sequences have been improved. Load voltage has been compensated in the fault condition)

**Figure 39.** Load side current of phase 1 (it has different order harmonics. It should be considered that this current has been calculated after the voltage compensation, so the voltage unbalance has not been concluded in the current)

Reference Generation of Custom Power Devices (CPs) 115

**Figure 43.** Generation PAF active and reactive powers (reactive power and harmonics of load current

**Figure 44.** Consumption active and reactive power of series active filter (it is considered that the consumption power has been increased between sag times and decreased between swell times. Cause of power oscillation has been investigated in the text. Active power has been increased in fault condition

**Figure 45.** Generation active and reactive power of source (it is considered that the generation active power has been increased between sag times and decreased between swell times. Reactive power has been compensated. Cause of power oscillation has been investigated in the text. These powers are equal

have been supplied by the parallel active filter)

for prevention of load interruption)

to zero in fault condition)

**Figure 40.** Compensator current of phase 1 (compensator current has been determined for the load current harmonics improvement as well as the reactive power)

**Figure 41.** Source side current of phase 1 (harmonics and reactive power components of the load current have been canceled)

**Figure 42.** Load active and reactive power (load is nonlinear resistive-inductive)

current have been canceled)

**Figure 40.** Compensator current of phase 1 (compensator current has been determined for the load

**Figure 41.** Source side current of phase 1 (harmonics and reactive power components of the load

**Figure 42.** Load active and reactive power (load is nonlinear resistive-inductive)

current harmonics improvement as well as the reactive power)

**Figure 43.** Generation PAF active and reactive powers (reactive power and harmonics of load current have been supplied by the parallel active filter)

**Figure 44.** Consumption active and reactive power of series active filter (it is considered that the consumption power has been increased between sag times and decreased between swell times. Cause of power oscillation has been investigated in the text. Active power has been increased in fault condition for prevention of load interruption)

**Figure 45.** Generation active and reactive power of source (it is considered that the generation active power has been increased between sag times and decreased between swell times. Reactive power has been compensated. Cause of power oscillation has been investigated in the text. These powers are equal to zero in fault condition)

Reference Generation of Custom Power Devices (CPs) 117

SAF. But, reactive power and current harmonics were compensated by PAF. THD of load voltage before compensation was 14.14 percent which was reduced to almost zero after the compensation. But, THD of the source current before compensation was 9 percent which

Also the proposed reference generation algorithm based on MOADALINE has been compiled in MATLAB software via M-File. Voltage harmonics have been compensated by SAF of the UPQC and current harmonics have been compensated by PAF of the UPQC. Based on the results proposed strategy not only could generate pure sinusoidal source current and load voltage but also could compensate source reactive power satisfactory. Total harmonic distortion of load voltage and current before compensation was 0.17 and 0.12

Another scope of this research was reference generation based on power flow control. This approach was based on relation between active and reactive powers and load voltage. In this approach amount of reactive power arranged to zero but amount of active power arranged to load nominal power. Also a PI controller used for arranging the load voltage

*Department of Electrical Engineering, Tabriz Branch, Islamic Azad University, Tabriz, Iran* 

*Department of Electrical Engineering, South Tehran Branch, Islamic Azad University, Tehran, Iran* 

[1] Fujita H., Akagi H. The Unified Power Quality Conditioner: The Integration of Series and Shunt Active Filters. IEEE Transaction on Power Electronics 1998; 13(2) 315-322. [2] Hannan M. A., Mohamed A. PSCAD/EMTDC Simulation of Unified Series-Shunt Compensator for Power Quality Improvement. IEEE Transaction on Power Delivery

[3] Shayanfar H. A., Mokhtarpour A. Management, Control and Automation of Power Quality Improvement. In: Eberhard A. (ed.) Power Quality. Austria: InTech; 2010.

[4] Khadkikar V., Chandra A. A Novel Structure for Three Phase Four Wire Distribution System Utilizing Unified Power Quality Conditioner (UPQC). IEEE Transactions on

[5] Kwan K.H., Chu Y.C., So P.L. Model-Based H∞ Control of a Unied Power Quality Conditioner. IEEE Transactions on Industrial Electronics 2009; 56 (7) 2493-2504.

was reduced to almost zero after the compensation.

magnitude to the nominal amount.

Seiied Mohammad Taghi Bathaee

2005; 20(2) 1650-1656.

**Author details** 

Ahad Mokhtarpour

Heidarali Shayanfar

**9. References** 

p127-152.

respectively which was reduced to almost zero after the compensation.

*Department of Electrical Engineering, K.N.T University, Tehran, Iran* 

Industry Applications 2009; 45(5) 1897-1902.

**Figure 46.** Difference between load voltage magnitude and nominal value (this amount is decreased by use of the PI controller to zero)

**Figure 47.** Difference between load voltage and source voltage phases (this amount decreased by use of PI controller to zero)

#### **8. Conclusions**

In this research different approaches for reference generation of UPQC have been proposed. Based on the general equations of Fourier transform, its response settling time is one cycle. In this research for increasing the response speed and improving the control system capabilities in dynamic conditions, very fast Fourier transform approach has been proposed for balanced three phase systems. In the proposed approach, settling time of the response could be reduced to one twelfth of a cycle. In the proposed approach, there were two data window lengths, T/12 and T/2. In the sag, swell, and load change conditions, control system was switched to T/12 for obtaining fast response. Then for improving the proposed approach responsibility in filtering of unwanted steady state oscillation, control system was switched to T/2 for obtaining no oscillated response. In these states, fast response in dynamic conditions as well as good response in the steady state conditions would be possible. In this research for the detection of the source voltage sag, swell, and load change conditions, derivative of the first order magnitude of the voltage and current signal, were compared to a constant value. This was based on the fact that in these conditions voltage or current magnitude generally changes rapidly. Proposed control approach was simulated in MATLAB/SIMULINK software. Voltage sag, swell, and harmonics were compensated by SAF. But, reactive power and current harmonics were compensated by PAF. THD of load voltage before compensation was 14.14 percent which was reduced to almost zero after the compensation. But, THD of the source current before compensation was 9 percent which was reduced to almost zero after the compensation.

Also the proposed reference generation algorithm based on MOADALINE has been compiled in MATLAB software via M-File. Voltage harmonics have been compensated by SAF of the UPQC and current harmonics have been compensated by PAF of the UPQC. Based on the results proposed strategy not only could generate pure sinusoidal source current and load voltage but also could compensate source reactive power satisfactory. Total harmonic distortion of load voltage and current before compensation was 0.17 and 0.12 respectively which was reduced to almost zero after the compensation.

Another scope of this research was reference generation based on power flow control. This approach was based on relation between active and reactive powers and load voltage. In this approach amount of reactive power arranged to zero but amount of active power arranged to load nominal power. Also a PI controller used for arranging the load voltage magnitude to the nominal amount.
