**3. Virtual grid flux oriented control**

Virtual grid flux vector control of grid connected Pulse Width Modulated (PWM) converter has many similarities with vector control of an electric machine. In fact grid is modeled as a synchronous machine with constant frequency and constant magnetization[2]. A virtual grid flux can be introduced in order to fully acknowledge the similarities between an electric machine and grid. In space vector theory, the virtual grid flux becomes a space vector that defines the rotating grid flux oriented reference frame, see in fig.2. The grid flux vector is aligned along d-axis in the reference frame, and grid voltage vector is aligned with q-axis. Finding the position of grid flux vector is equivalent to finding the position of the grid voltage vector. An accurate field orientation can be expected since the grid flux can be measured. The grid currents are controlled in a rotating two-axis grid flux orientated reference frame. In this reference frame, the real part of the current corresponds to reactive power while the imaginary part of the current corresponds to active power. The reactive and active power can therefore be controlled independently since the current components are orthogonal. Accurate field orientation for a grid connected converter becomes simple since the grid flux position can be derived from the measurable grid voltages. The grid flux position is given by

$$\cos(\theta\_{\underline{s}}) = \frac{e\_{\underline{s}\beta}}{\left|e\_{\underline{s}}\right|} \prime \sin(\theta\_{\underline{s}}) = -\frac{e\_{\underline{s}\alpha}}{\left|e\_{\underline{s}}\right|}\tag{1}$$

#### **3.1 Action of Phase lock loop (PLL)**

The implementation of the grid voltage orientation requires the accurate and robust acquisition of the phase angle of the grid voltage fundamental wave, considering strong distortions due to converter mains pollution or other harmonic sources. Usually this is accomplished by means of a phase lock loop (PLL). PLL determines the position of the virtual grid flux vector and provides angle (θg) which is used to generate unit vectors cos(θg), sin(θg) for converting stationary two phase quantities in stationary reference frame

Power Quality Improvement by Using

Synchronous Virtual Grid Flux Oriented Control of Grid Side Converter 117

In this reference frame, the real part of the current corresponds to reactive power while the imaginary part of the current corresponds to active power. The reactive and active power can therefore be controlled independently since the current components are orthogonal [2].

Fig. 4. Block diagram of virtual grid flux oriented control of grid connected VSI

Fig. 5. Block diagram of closed loop control of dc link voltage

into rotating two phase quantities in virtual grid flux oriented reference frame. PLL is ensures the phase angle between grid voltages and currents is zero. That means PLL provides displacement power factor as unity.

Fig. 2. Virtual grid flux oriented reference frame

Fig. 3. Instantaneous PLL circuit

#### **3.2 Control scheme for grid connected VSI**

The block diagram of purposed system is shown in fig .4. The control system of vector controlled grid connected converter here consisting two control loops. The inner control loop having novel hysteresis current controller which controls the active and reactive grid current components. The active current component is generated by an outer direct voltage control loop and the reactive current reference can be set to zero for a unity power factor. The grid currents are controlled in a rotating two-axis grid flux orientated reference frame.

into rotating two phase quantities in virtual grid flux oriented reference frame. PLL is ensures the phase angle between grid voltages and currents is zero. That means PLL

ig

egα

α

d

Ψgd

Өgf

The block diagram of purposed system is shown in fig .4. The control system of vector controlled grid connected converter here consisting two control loops. The inner control loop having novel hysteresis current controller which controls the active and reactive grid current components. The active current component is generated by an outer direct voltage control loop and the reactive current reference can be set to zero for a unity power factor. The grid currents are controlled in a rotating two-axis grid flux orientated reference frame.

eg

igd igq

provides displacement power factor as unity.

egβ

Fig. 2. Virtual grid flux oriented reference frame

β

egq

Fig. 3. Instantaneous PLL circuit

**3.2 Control scheme for grid connected VSI** 

q

In this reference frame, the real part of the current corresponds to reactive power while the imaginary part of the current corresponds to active power. The reactive and active power can therefore be controlled independently since the current components are orthogonal [2].

Fig. 4. Block diagram of virtual grid flux oriented control of grid connected VSI

Fig. 5. Block diagram of closed loop control of dc link voltage

#### **3.2.1 DC voltage controller (outer loop)**

The following derivation of direct voltage controller assumes instantaneous impressed grid currents and perfect grid flux orientation. The instantaneous power flowing into grid can be written as

$$\mathbf{S}\_{\mathcal{S}} = P\_{\mathcal{S}} + jQ\_{\mathcal{S}} = \frac{3}{2}\boldsymbol{e}\_{\mathcal{S}}\mathbf{i}\_{\mathcal{S}}^{\*} = \frac{3}{2}(\left|\boldsymbol{e}\_{\mathcal{S}}\right|\mathbf{i}\_{q} + j\left|\boldsymbol{e}\_{\mathcal{S}}\right|\mathbf{i}\_{d})\tag{2}$$

$$S\_{\mathcal{S}} = \frac{\mathfrak{J}}{2} (\left| e\_{\mathcal{S}} \right| i\_q + j \left| e\_{\mathcal{S}} \right| i\_d) \tag{3}$$

Power Quality Improvement by Using

loop bandwidth of the direct voltage link.

part of eq.3 reactive reference current as

which are given to current controller.

**4.1 Objectives** 

**4. Current control approach to VSI** 

source inverters have fallowing advantages:

2. Peak current protection. 3. Overload rejection.

4. Extremely good dynamics.

1. Control of instantaneous current waveform and high accuracy.

**3.2.2 Open loop reactive power control (outer loop)** 

Synchronous Virtual Grid Flux Oriented Control of Grid Side Converter 119

the reference value. However, there will be a remaining error when the gird is loaded and active power flows between the direct voltage link and the grid. The remaining error can be eliminated by adding an integrator to the direct voltage link controller. The following is often adapted for selecting the controller integration time in traditional PI-controller design.

10 10

= ≈ (10)

(12)

*<sup>e</sup>* <sup>=</sup> (13)

\*

=+ − (11)

*c*

\* \* <sup>1</sup> (1 )( ) *gq p dc dc i i K uu T p*

> *Cu <sup>k</sup> <sup>e</sup>* = −α

Negative proportional gain is because the distributed energy source references are used for grid. A block diagram that represents the direct voltage control is shown in Fig. 5. Note that closed-loop bandwidth of the current control is assumed to be much faster than the closed-

The reactive power flowing into grid is controlled by the reactive current component. Simplest form of controlling reactive power is through open loop control. Taking imaginary

> \* \* 2 3 *gd <sup>g</sup> gq i Q*

The igq\* and igd\* current references are converted into three phase current references ia\*, ib\*, ic

The current control methods play an important role in power electronic systems, mainly in current controlled PWM voltage source inverters which are widely used in ac motor drives, active filters, and high power factor, uninterruptable power supply (UPS) systems, and continuous ac power supplies [5]. The performance of converter system is largely dependence on type of current control strategy. Therefore current controlled PWM voltage source inverters are one of the main subjects in modern power electronics. Compared to conventional open loop PWM voltage source inverter, the current controlled PWM voltage

\* 2 3 *dc*

*g*

ω α

*i*

*T*

*p*

The active reference current of the grid connected converter can be written as

The active power is real part of equation.3.

$$P\_{\mathcal{S}} = \frac{3}{2} \left| e\_{\mathcal{S}} \right| i\_{\mathcal{S}^q} \tag{4}$$

When neglecting capacitor leakage, the direct voltage link power is given by

$$P\_{\rm DC} = \mu\_{\rm DC} i\_{\rm DC} = \mu\_{\rm DC} \mathcal{C} \frac{d\mu}{dt} \tag{5}$$

Assuming the converter losses are neglected, the power balance in the direct voltage link is given by

$$
\mu\_{D\mathbb{C}} \mathbb{C} \frac{d\mu\_{\mathbb{D}\mathbb{C}}}{dt} = -P\_s - P\_{\mathbb{g}} = -P\_s - \frac{\mathfrak{Z}}{2} \Big| e\_{\mathfrak{g}} \Big| i\_{\mathfrak{g}g} \tag{6}
$$

Where Ps is the distributed energy system power is assumed to be independent of the DC voltage. A transfer function of between direct voltage and active grid current Ig is obtained as

$$\mu\_{\rm DC} = -\frac{\Im \left| \mathcal{e}\_{\mathcal{S}} \right|}{2\mathcal{p}\mathcal{C}\mu\_{\rm DC}} \mathbf{i}\_{\mathcal{R}^q} \tag{7}$$

The transfer function is non-linear. It is acceptable to substitute the direct voltage with the reference set value since the objective is to maintain a constant direct voltage. The assumption gives linearized transfer function.

\* 3 2 *g DC gq DC e u i pCu* ≈ − (8)

Applying internal model control gives the direct voltage link controller as

$$F = \frac{\alpha}{p} G^{-1} = -\alpha \frac{2\text{Cu}\_{\text{dc}}^{\ast}}{3\left|\varepsilon\_{\text{g}}\right|}\tag{9}$$

From eq.8, a P-controller is obtained for regulating the direct voltage. The P- controller is optimal for an integrator process in the sense that the P- controller eliminates the remaining error for steps in the reference value. However, there will be a remaining error for steps in the reference value. However, there will be a remaining error when the gird is loaded and active power flows between the direct voltage link and the grid. The remaining error can be eliminated by adding an integrator to the direct voltage link controller. The following is often adapted for selecting the controller integration time in traditional PI-controller design.

$$T\_i = \frac{10}{\alpha \rho\_c} = \frac{10}{\alpha} \tag{10}$$

The active reference current of the grid connected converter can be written as

$$
\mu\_{gq}^\* = K\_p (1 + \frac{1}{T\_{\phantom{\alpha}} p}) (\mu\_{\phantom{\alpha}}^\* - \mu\_{\phantom{\alpha}}) \tag{11}
$$

$$k\_{\nu} = -\alpha \frac{2C\mu\_{dc}^{\ast}}{3\left|e\_{\mathcal{S}}\right|}\tag{12}$$

Negative proportional gain is because the distributed energy source references are used for grid. A block diagram that represents the direct voltage control is shown in Fig. 5. Note that closed-loop bandwidth of the current control is assumed to be much faster than the closedloop bandwidth of the direct voltage link.

#### **3.2.2 Open loop reactive power control (outer loop)**

The reactive power flowing into grid is controlled by the reactive current component. Simplest form of controlling reactive power is through open loop control. Taking imaginary part of eq.3 reactive reference current as

$$\dot{\boldsymbol{a}}\_{\mathcal{S}^d} \stackrel{\*}{=} \frac{2}{3\boldsymbol{e}\_{\mathcal{S}^d}} \boldsymbol{Q}\_{\mathcal{S}}^{\*} \tag{13}$$

The igq\* and igd\* current references are converted into three phase current references ia\*, ib\*, ic \* which are given to current controller.
