**A Generalized Voltage Control Algorithm for Smooth Transition Operation of Microgrids**

Jing Wang and Bouna Mohamed Cisse

Additional information is available at the end of the chapter

http://dx.doi.org/10.5772/intechopen.69402

#### Abstract

The chapter proposes a generalized control algorithm that can reject the disturbances associated with microgrid transition operation to facilitate smooth microgrid transition operation. Firstly, the literature review of the state-of-the-art gives a deep analysis of the disturbances associated with microgrid transition operation and it reveals that the same controller should be adopted in the inverter control layer to prevent some harmful transients during transition. Then, a generalized voltage control algorithm in inverter control layer that can achieve smooth transition of microgrid is developed including the formulation of the problem, description of the design methodology and design procedures, and analytical study. The salient feature of the developed generalized voltage control algorithm is that the disturbances associated with microgrid transition are fully cancelled by using inverse dynamic model, and the inverter control layer can be seen as a bypass for the application layer. The practical feasibility of the proposed control algorithm is demonstrated by implementing and testing in a signal level hardwarein-the-loop (HIL) platform.

Keywords: microgrid transition operation, inverter control, inverse dynamic model, voltage control

### 1. Introduction

According to a survey performed by Microgrid Knowledge, electric reliability is the number one reason customers install microgrids, thanks to their ability to provide uninterrupted power supply (in particular, for critical loads) when the utility is lost. For this reason, a microgrid should be controlled to operate both in grid-connected and in islanded mode, as well as to transit seamlessly between the two [1–3]. In the transition between grid-connected and islanded mode, two types of disturbances are expected to occur and therefore the controller of the inverter may have to deal with (1) frequency disturbances related to a sudden change

© 2017 The Author(s). Licensee InTech. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

of the angle/frequency reference for the inverter control, and (2) current and voltage disturbances associated with switching between different operating modes [4]. Therefore, the inverter controller should reduce the impact from those disturbances to acceptable limits, or, at best case, eliminate them completely.

For the first type of disturbance, the seamless transfer techniques focus on the application layer and the essential effort is to improve power angle/voltage transients during transition. Thanks to the smooth modifications of the references (i.e. frequency, voltage and current) for the inverter layer (voltage and current controller), smooth transition operation can be achieved. As for the second type of disturbance, extensive research works have been undertaken in the inverter controller to improve the disturbance rejection performance. However, the impact from the disturbances can only be reduced and the robustness of these controllers is not guaranteed during the transition of different operating modes.

Motivated by the research gap, a novel inverter control algorithm is developed based on the inverse dynamic model of the LC filter and the inverter, transforming the closed loop transfer function of the inverter control level into the 'unitary gain'. The inverter controller with the unitary gain property automatically eliminates the second type of disturbance during the microgrid transition operation; therefore, smooth transition operation is achieved.

Figure 1. Modified control structure for DGs in microgrid operating in different modes.

### 2. A generalized control architecture for DGs in microgrid

of the angle/frequency reference for the inverter control, and (2) current and voltage disturbances associated with switching between different operating modes [4]. Therefore, the inverter controller should reduce the impact from those disturbances to acceptable limits, or,

For the first type of disturbance, the seamless transfer techniques focus on the application layer and the essential effort is to improve power angle/voltage transients during transition. Thanks to the smooth modifications of the references (i.e. frequency, voltage and current) for the inverter layer (voltage and current controller), smooth transition operation can be achieved. As for the second type of disturbance, extensive research works have been undertaken in the inverter controller to improve the disturbance rejection performance. However, the impact from the disturbances can only be reduced and the robustness of these controllers is not

Motivated by the research gap, a novel inverter control algorithm is developed based on the inverse dynamic model of the LC filter and the inverter, transforming the closed loop transfer function of the inverter control level into the 'unitary gain'. The inverter controller with the unitary gain property automatically eliminates the second type of disturbance during the

microgrid transition operation; therefore, smooth transition operation is achieved.

at best case, eliminate them completely.

80 Development and Integration of Microgrids

guaranteed during the transition of different operating modes.

Figure 1. Modified control structure for DGs in microgrid operating in different modes.

The control structure for DG interface in microgrids is mapped in Figure 1 according to the IEEE Std. 1676, compatible with all the microgrid operation modes [5]. The highest layer, the system control layer, is implemented in microgrid central controller (energy management system (EMS)). The lower layers are locally applied in decentralized controller of each DG unit.

The main task of the system control layer is to manage the operation modes (grid-forming, gridfeeding and grid-supporting mode) of DGs in microgrid based on the network characteristic and distribution network operator (DNO)'s request and then to send the corresponding reference signals and control commands to the application and the inverter control layers. The application control layer generates a specific voltage reference for the inverter layer according to the chosen operation. The inverter control layer executes the commands to fulfil the task set by the system control layer, and it hosts the proposed generalized voltage controller, designed to reject the current/voltage disturbances associated with microgrid transition operation. The functions of the hardware control layer of inverter can reference the IEEE Std. 1676 for PEBB system.

### 3. Key challenge and a promising solution: an intelligent control algorithm in inverter control layer

As stated in Section 1, the key challenge in designing a controller to reject the harmful voltage and current transients caused by the shift of microgrid operation mode is in the design of the inverter layer control algorithm. Microgrids in islanded mode and grid-connected mode applications have been considered in the past separately from the point of view of control design in the inverter control layer. This control strategy causes unnecessary harmful transients in the control system [5, 6]. Moreover, the commonly adopted control algorithm in inverter control layer has a non-negligible drawback: if the voltage is controlled, the system performance is sensitive to the output current of the LC/LCL filter and the output impedance (gain of the output current) of the inverter, which act as disturbances to the output voltage [7]. The same applies to the current control if the control variable is the output current of the LC/LCL filter. Therefore, a promising solution to solve the issues in the existing control methods is direct voltage control method adopted in the inverter control layer, and a good disturbance rejection strategy should be considered to fully cancel the disturbances in the inverter control layer. As the disturbances in the inverter control system can be measured, full feedforward compensation through inverse dynamic model can be applied to totally cancel the disturbances: a detailed methodology and principles are explained in the following section.

### 3.1. Principle of inverse dynamic model

The basic structure of a single-input/single-output plant using the inverse dynamic model feedforward is shown in Figure 2. The plant input u is composed of two parts: the feedback control input ud and the inverse dynamic model uf. The inverse dynamic model Gi(s) is used in the feedforward path of the controller to compute the desired actuator inputs uf to the plant.

Figure 2. Control structure with inverse plant model in the feedforward path.

The feedback control C(s) eliminates the tracking error. The feedforward control and feedback control can be designed separately, which follows the design concept of the two-degree-offreedom control.

The transfer function of the above system is given by

$$\frac{y}{y^\*} = \frac{G(s)\mathcal{G}\_i(s) + G(s)\mathcal{C}(s)}{1 + G(s)\mathcal{C}(s)}\tag{1}$$

If an accurate inverse model of the plant is obtained (Gi(s)�G-1(s)) and in a proper form, then the transfer function of the controlled system has a unitary gain for all frequencies. Thus, all the internal disturbances imposed upon the controlled output are fully cancelled.

#### 3.2. Control strategy in the inverter control layer

Different control strategies in the application layer regulate different outputs of the DG (e.g. desirable active and reactive power generation, voltage and frequency regulation, and maximum active power injection). Essentially, these control strategies translate the various outputs into references for the injected current or the terminal voltage in the inverter control layer. To achieve universality, a new inverter control algorithm is required to control either one of these variables in a flexible way. As the impedance between the DG and the grid is a known parameter and the main grid voltage is an external measurable variable, the injected DG current can be indirectly regulated by controlling the terminal voltage [5]. Thus, universality is attained by introducing a voltage-based control algorithm into the inverter control layer.

By integrating disturbance rejection and universality of the control algorithm in the inverter control layer, a control algorithm based on the inverse dynamic model method is developed [5]. The control structure of this algorithm is presented in Figure 3. As seen in the figure, the control algorithm includes double loops: outer voltage and inner current loop. The inverse dynamic model 1 shows the analytical relationship between the inverter output voltage vo and the inverter current ii and also illustrates the input-output relationship between them. To compel the control system to achieve the target output vo\*, the corresponding control input iiff\* needs to be brutally imposed on the system. Incorporating the additional feedback control A Generalized Voltage Control Algorithm for Smooth Transition Operation of Microgrids http://dx.doi.org/10.5772/intechopen.69402 83

Figure 3. Control structure of the developed intelligent control algorithm using inverse dynamic model.

block 1, the closed loop transfer function of the outer loop is 'unitary gain'. The inner current loop respects the same design strategy and achieves also the closed loop transfer function with 'unitary gain'.

#### 4. Design of the inverter layer control algorithm

The feedback control C(s) eliminates the tracking error. The feedforward control and feedback control can be designed separately, which follows the design concept of the two-degree-of-

<sup>y</sup>� <sup>¼</sup> <sup>G</sup>ðsÞGiðsÞ þ <sup>G</sup>ðsÞCðs<sup>Þ</sup>

If an accurate inverse model of the plant is obtained (Gi(s)�G-1(s)) and in a proper form, then the transfer function of the controlled system has a unitary gain for all frequencies. Thus, all

Different control strategies in the application layer regulate different outputs of the DG (e.g. desirable active and reactive power generation, voltage and frequency regulation, and maximum active power injection). Essentially, these control strategies translate the various outputs into references for the injected current or the terminal voltage in the inverter control layer. To achieve universality, a new inverter control algorithm is required to control either one of these variables in a flexible way. As the impedance between the DG and the grid is a known parameter and the main grid voltage is an external measurable variable, the injected DG current can be indirectly regulated by controlling the terminal voltage [5]. Thus, universality is attained by introducing a voltage-based control algorithm into the inverter control layer.

By integrating disturbance rejection and universality of the control algorithm in the inverter control layer, a control algorithm based on the inverse dynamic model method is developed [5]. The control structure of this algorithm is presented in Figure 3. As seen in the figure, the control algorithm includes double loops: outer voltage and inner current loop. The inverse dynamic model 1 shows the analytical relationship between the inverter output voltage vo and the inverter current ii and also illustrates the input-output relationship between them. To compel the control system to achieve the target output vo\*, the corresponding control input iiff\* needs to be brutally imposed on the system. Incorporating the additional feedback control

the internal disturbances imposed upon the controlled output are fully cancelled.

<sup>1</sup> <sup>þ</sup> <sup>G</sup>ðsÞCðs<sup>Þ</sup> <sup>ð</sup>1<sup>Þ</sup>

freedom control.

82 Development and Integration of Microgrids

The transfer function of the above system is given by

Figure 2. Control structure with inverse plant model in the feedforward path.

3.2. Control strategy in the inverter control layer

y

The design of the generalized voltage control algorithm in the inverter control layer is based on the model of the LC filter and the inverter (the inverter is treated as a gain '1'). Figure 4 shows the circuit diagram of the DG interface and LC filter together with the simplified structure of the control algorithm in the inverter control layer. All the variables are represented in synchronous frame and the dynamics of the LC filter are formulated in Eqs. (2)–(5):

$$\frac{d\dot{\mathbf{u}}\_{\rm id}}{dt} = -\frac{\mathcal{R}\_f}{L\_f}\dot{\mathbf{i}}\_{\rm id} + \frac{1}{L\_f}(\boldsymbol{\upsilon}\_{\rm id} - \boldsymbol{\upsilon}\_{\rm ad}) + \boldsymbol{\omega}\_o \dot{\mathbf{i}}\_{\rm iq} \tag{2}$$

$$\frac{d\dot{\mathbf{u}}\_{i\dot{\boldsymbol{q}}}}{d\mathbf{t}} = -\frac{R\_{\mathcal{f}}}{L\_{\mathcal{f}}}\dot{\mathbf{i}}\_{i\dot{\boldsymbol{q}}} + \frac{1}{L\_{\mathcal{f}}}(\boldsymbol{\upsilon}\_{i\dot{\boldsymbol{q}}} - \boldsymbol{\upsilon}\_{o\boldsymbol{q}}) - \boldsymbol{\omega}\_{o}\dot{\mathbf{i}}\_{i\dot{d}}\tag{3}$$

$$\frac{d\upsilon\_{ad}}{dt} = -\frac{1}{C\_f}(\dot{\iota}\_{id} - \dot{\iota}\_{ad}) + R\_c \left(\frac{d\dot{\iota}\_{id}}{dt} - \omega\_o \dot{\iota}\_{i\eta}\right) - R\_c \left(\frac{d\dot{\iota}\_{ad}}{dt} - \omega\_o \dot{\iota}\_{a\eta}\right) + \omega\_o \upsilon\_{a\eta} \tag{4}$$

$$\frac{d\upsilon\_{aq}}{dt} = -\frac{1}{\mathbf{C}\_f}(\dot{\imath}\_{\dot{\imath}q} - \dot{\imath}\_{aq}) + R\_c \left(\frac{d\dot{\imath}\_{\dot{\imath}q}}{dt} + \omega\_o \dot{\imath}\_{\dot{\imath}d}\right) - R\_c \left(\frac{d\dot{\imath}\_{aq}}{dt} + \omega\_o \dot{\imath}\_{\dot{\alpha}d}\right) - \omega\_o \upsilon\_{ad} \tag{5}$$

where iid, iiq ,iod, ioq are the inverter currents and inverter output currents in the dq frame, respectively, and vid, viq, vod ,voq are the inverter voltages and inverter terminal voltages in the dq frame, respectively. Rf, Lf , Cf and Rc are the per-phase resistance, inductance and capacitance of the LC filter.

By using Laplace transformation, we obtain the transfer functions for the inverter current and inverter terminal voltage:

Figure 4. Circuit diagram and control structure of the inverter control layer.

$$\dot{q}\_{id} = \frac{1}{sL\_f + R\_f} (\upsilon\_{id} - \upsilon\_{od} + \omega\_o L\_f \dot{\imath}\_{iq}) \tag{6}$$

$$\dot{\mathbf{i}}\_{iq} = \frac{1}{sL\_f + R\_f} (\upsilon\_{iq} - \upsilon\_{\alpha q} - \omega\_o L\_f \dot{\mathbf{i}}\_{id}) \tag{7}$$

$$
\sigma\_{od} = \left(\frac{1}{\text{s}L\_f} + R\_c\right)(\dot{\mathbf{i}}\_{id} - \dot{\mathbf{i}}\_{od}) - \omega\_o \frac{R\_c}{\text{s}}(\dot{\mathbf{i}}\_{iq} - \dot{\mathbf{i}}\_{aq}) + \frac{\omega\_o}{\text{s}}\sigma\_{aq} \tag{8}
$$

$$
\sigma\_{aq} = \left(\frac{1}{sL\_f} + R\_c\right)(\dot{\mathbf{i}}\_{i\dot{q}} - \dot{\mathbf{i}}\_{aq}) + \omega\_o \frac{R\_c}{s}(\dot{\mathbf{i}}\_{id} - \dot{\mathbf{i}}\_{od}) - \frac{\omega\_o}{s}\sigma\_{od} \tag{9}
$$

It becomes evident that the system described above is highly coupled. For instance, the currents are functions of both voltages and the coupling terms of voltage, the latter of which interferes with voltage as well. The block in Figure 5 shows the coupled system and resistance of the LC filter.

The dynamics of the LC filter can be expressed as one equation for the inverter current and one for the terminal voltage for each component. This structure suggests a cascaded control structure for the inverter control containing one inner current loop and one outer voltage loop. In the controller design, the inverter current ii and the output voltage vo are the controlled variables for current controller and voltage controller, respectively. The choice of the voltage loop as outer loop is a natural consequence of the fact that the inverter output voltage is the filter's outermost variable. The general idea is to force the controlled variables to quickly follow the reference signal and to be robust against disturbances and coupling terms. At the same time, in order to achieve maximum transparency to higher control levels, the proposed controller is designed in such a way that both the current closed loop and voltage closed loop have a unitary transfer function. Therefore, all effects of disturbances are removed and the inverter is A Generalized Voltage Control Algorithm for Smooth Transition Operation of Microgrids http://dx.doi.org/10.5772/intechopen.69402 85

Figure 5. Block diagram of dynamics of the LC filter.

iid <sup>¼</sup> <sup>1</sup> sLf þ Rf

Figure 4. Circuit diagram and control structure of the inverter control layer.

84 Development and Integration of Microgrids

iiq <sup>¼</sup> <sup>1</sup> sLf þ Rf

ðiid � iodÞ � ω<sup>o</sup>

ðiiq � ioqÞ þ ω<sup>o</sup>

It becomes evident that the system described above is highly coupled. For instance, the currents are functions of both voltages and the coupling terms of voltage, the latter of which interferes with voltage as well. The block in Figure 5 shows the coupled system and resistance of the LC filter. The dynamics of the LC filter can be expressed as one equation for the inverter current and one for the terminal voltage for each component. This structure suggests a cascaded control structure for the inverter control containing one inner current loop and one outer voltage loop. In the controller design, the inverter current ii and the output voltage vo are the controlled variables for current controller and voltage controller, respectively. The choice of the voltage loop as outer loop is a natural consequence of the fact that the inverter output voltage is the filter's outermost variable. The general idea is to force the controlled variables to quickly follow the reference signal and to be robust against disturbances and coupling terms. At the same time, in order to achieve maximum transparency to higher control levels, the proposed controller is designed in such a way that both the current closed loop and voltage closed loop have a unitary transfer function. Therefore, all effects of disturbances are removed and the inverter is

Rc

Rc

<sup>s</sup> <sup>ð</sup>iiq � ioqÞ þ <sup>ω</sup><sup>o</sup>

<sup>s</sup> <sup>ð</sup>iid � iodÞ � <sup>ω</sup><sup>o</sup>

vod <sup>¼</sup> <sup>1</sup> sLf þ Rc 

voq <sup>¼</sup> <sup>1</sup> sLf þ Rc  ðvid � vod þ ωoLf iiqÞ ð6Þ

ðviq � voq � ωoLf iidÞ ð7Þ

s

s

voq ð8Þ

vod ð9Þ

theoretically transformed into a virtual bypass to the current or voltage reference signal. Once this is achieved, the whole inverter can be operated as a perfectly controllable voltage source.

Figure 6 illustrates the abstract control structure of a controlled variable in d axis (iid and vod) containing all the blocks: the inverse dynamics feedforward control, feedforward control of disturbance, feedback control and decoupling effects. There are two different implementations as shown in Figure 6: the parallel and the series connection of the FF and FB blocks. As the series implementation results in more complex internal dynamics and it is more vulnerable to measurement noises, both current and voltage control have been implemented using the parallel connection. An important assumption made is that we neglected the dynamics of the inverter, thus making the inverter act as bypass (v� <sup>i</sup> ¼ vi) as well. This approximation is valid since advanced synchronized sampling techniques can reduce the time-delay of inverter digital implementation to 0:25Tsampling [8]; thus, the inverter can be approximated as a unitary gain without delay. If the control for inverter could be successfully implemented according to the strategy shown in Figure 6 (top), the inverter's control algorithm would yield the closed loop system displayed in the block diagram shown in Figure 4.

Figure 4 shows the simplified control block of the cascaded voltage and current controller in inverter control layer, which is in line with the structure illustrated in Figure 3. The outer voltage loop has two components: FBVC and FFVC denote feedback voltage control and feedforward voltage control, respectively. The inner current loop consists of two components: FBCC and FFCC, standing for feedback current control and feedforward current control, respectively. The feedforward control is a crucial element in this control system, which contains the inverse dynamic model of the LC-filter shown in Eqs. (2)–(5) and its main effect is

Figure 6. Abstract structure of the proposed control algorithm and its components. Parallel (top) and serial (bottom) connection of feedback and feedforward control.

to perform ideal compensation of the filter's dynamics within each loop. A deeper insight into the feedforward control indicates that there are three components in each loop. The first component consists of the decoupling elements; these remove the coupling between the d and q variables. The second is the disturbance compensation; this eliminates the effect of measurable variables acting as disturbances to each loop (including an active damping function based on back electromotive force (EMF)-decoupling). Finally, the third component counteracts the dynamics of the control path, transforming the dynamics of the controlled variable into a virtual bypass for the reference value [9, 10].

#### 4.1. Inner current loop controller

The inner current control loop is seen as a bypass in the perspective of the outer voltage control loop. Accordingly, the following relationship should hold:

$$\mathbf{i}\_{\rm id} = \mathbf{i}\_{\rm id}^\* \quad \mathbf{i}\_{\rm iq} = \mathbf{i}\_{\rm iq}^\* \tag{10}$$

In order to achieve this, the feedforward component of the current control simply inverts the dynamics described in Eqs. (6) and (7) and then we obtain the following control law for the feedforward component viff \* :

$$
\boldsymbol{\sigma}\_{ijfd}^{\*} = (\boldsymbol{s}\boldsymbol{L}\_f + \boldsymbol{R}\_f)\mathbf{i}\_{id}^{\*} - \boldsymbol{\omega}\_o \boldsymbol{L}\_f \mathbf{i}\_{iq} + \boldsymbol{\upsilon}\_{od} \tag{11}
$$

$$
\sigma\_{ijq}^\* = (sL\_f + R\_f)i\_{iq}^\* + \omega\_o L\_f i\_{id} + \upsilon\_{oq} \tag{12}
$$

These equations could already be used directly as the control law for current control. They include the inverse dynamic feedforward term for the reference current signal. This feedforward term compensates the inverter disturbances including the terminal voltage and coupling elements.

Nonetheless, the first term in Eq. (11) and (12) contains a component with differential behaviour (denoted by the Laplace operator). It is not recommended to employ this control law in the inner control loops which could directly amplify and feed the high-order harmonics in the inverter system which in the end results in undesirable low-order harmonics. In the worst case, this derivative term could lead to unacceptable THD or even instabilities to the control system. Furthermore, the equations must include a feedback term to cancel the deviation between the actual output and the reference current. A P-control is parallel connected to the feedforward control. The use of a P-control instead of a PI-control can be explained by the fact that the steadystate error in the inner loop is automatically sensed and compensated by the outer control loop with the cascaded structure. The feedback controls of the inner current loop are given by

$$
\boldsymbol{\upsilon}\_{\boldsymbol{\dot{\mu}}\boldsymbol{\delta}\boldsymbol{d}}^{\*} = \boldsymbol{K}\_{\text{CP}}(\mathbf{i}\_{\text{id}}^{\*} - \mathbf{i}\_{\text{id}}) \; \; \; \boldsymbol{\upsilon}\_{\boldsymbol{\dot{\mu}}\boldsymbol{b}\boldsymbol{q}}^{\*} = \boldsymbol{K}\_{\text{CP}}(\mathbf{i}\_{\text{i}\boldsymbol{q}}^{\*} - \mathbf{i}\_{\text{i}\boldsymbol{q}}) \tag{13}
$$

Therefore, after deleting the derivative element in the feedforward original control law, the updated control law for the current control including the P-control is given by

$$
\boldsymbol{\upsilon}\_{\rm id}^{\*} = \boldsymbol{\upsilon}\_{\rm iffd}^{\*} + \boldsymbol{\upsilon}\_{\rm ifbd}^{\*} \; \boldsymbol{\upsilon}\_{\rm iq}^{\*} = \boldsymbol{\upsilon}\_{\rm iffq}^{\*} + \boldsymbol{\upsilon}\_{\rm ifbq}^{\*} \tag{14}
$$

where Kcp is the proportional gain of the feedback control.

The transfer function for the inner loop can be obtained by substituting Eq. (14) into Eq. (6) and (7), and then we obtain

$$\dot{\mathbf{i}}\_{\rm id} = \frac{\mathbf{R}\_f + \mathbf{K}\_{\rm cp}}{\mathbf{s} \cdot \mathbf{L}\_f + \mathbf{R}\_f + \mathbf{K}\_{\rm cp}} \mathbf{i}\_{\rm id}^\* \,\mathbf{i}\_{\rm iq} = \frac{\mathbf{R}\_f + \mathbf{K}\_{\rm cp}}{\mathbf{s} \cdot \mathbf{L}\_f + \mathbf{R}\_f + \mathbf{K}\_{\rm cp}} \mathbf{i}\_{\rm iq}^\* \tag{15}$$

#### 4.2. Outer voltage loop controller

to perform ideal compensation of the filter's dynamics within each loop. A deeper insight into the feedforward control indicates that there are three components in each loop. The first component consists of the decoupling elements; these remove the coupling between the d and q variables. The second is the disturbance compensation; this eliminates the effect of measurable variables acting as disturbances to each loop (including an active damping function based on back electromotive force (EMF)-decoupling). Finally, the third component counteracts the dynamics of the control path, transforming the dynamics of the controlled variable into a

Figure 6. Abstract structure of the proposed control algorithm and its components. Parallel (top) and serial (bottom)

The inner current control loop is seen as a bypass in the perspective of the outer voltage control

virtual bypass for the reference value [9, 10].

connection of feedback and feedforward control.

86 Development and Integration of Microgrids

loop. Accordingly, the following relationship should hold:

4.1. Inner current loop controller

In an analogous manner, the closed loop of the voltage controller can be designed as a bypass for the application layer controller as well. Therefore, the closed loop transfer function of the voltage controller is expressed in the form of 'unitary gain' shown as follows:

$$
\boldsymbol{\upsilon}\_{\alpha l} = \boldsymbol{\upsilon}\_{\alpha l'}^\* \ \boldsymbol{\upsilon}\_{\alpha \eta} = \boldsymbol{\upsilon}\_{\alpha \eta}^\* \tag{16}
$$

Therefore, the same strategy will be applied in the design of the voltage control law. The control algorithm is obtained by substituting Eqs. (4) and (5) into Eq. (16) and rearranging in terms of the reference for the inverter current. As shown in Figures 3 and 4, the voltage controller includes both feedforward control and feedback control. The control laws of the outer voltage loop are formulated as follows:

$$\dot{q}\_{ijfd}^{\*} = \frac{\mathbf{s} \cdot \mathbf{C}\_{f}}{\mathbf{1} + \mathbf{s} \cdot \mathbf{C}\_{f} \cdot \mathbf{R}\_{c}} \mathbf{v}\_{ad}^{\*} - \frac{\mathbf{C}\_{f}}{\mathbf{1} + \mathbf{s} \cdot \mathbf{C}\_{f} \cdot \mathbf{R}\_{c}} \mathbf{v}\_{aq} + w\_{o} \frac{\mathbf{C}\_{f} \mathbf{R}\_{c}}{\mathbf{1} + \mathbf{s} \cdot \mathbf{C}\_{f} \cdot \mathbf{R}\_{c}} \dot{\mathbf{i}}\_{iq} - w\_{o} \frac{\mathbf{C}\_{f} \mathbf{R}\_{c}}{\mathbf{1} + \mathbf{s} \cdot \mathbf{C}\_{f} \cdot \mathbf{R}\_{c}} \mathbf{i}\_{od} + \dot{\mathbf{i}}\_{od} \tag{17}$$

$$\dot{q}\_{ij\uparrow q}^{\*} = \frac{s \cdot \mathbb{C}\_{f}}{1 + s \cdot \mathbb{C}\_{f} \cdot R\_{\text{c}}} v\_{\alpha q}^{\*} + \omega\_{o} \frac{\mathbb{C}\_{f}}{1 + s \cdot \mathbb{C}\_{f} \cdot R\_{\text{c}}} v\_{\alpha d} - \omega\_{o} \frac{\mathbb{C}\_{f} R\_{\text{c}}}{1 + s \cdot \mathbb{C}\_{f} \cdot R\_{\text{c}}} i\_{\text{id}} + \omega\_{o} \frac{\mathbb{C}\_{f} R\_{\text{c}}}{1 + s \cdot \mathbb{C}\_{f} \cdot R\_{\text{c}}} i\_{\text{ad}} + i\_{\text{o}q} \tag{18}$$

$$\mathbf{i}\_{ifbd}^{\*} = \frac{\mathbf{s} \cdot \mathbf{K}\_{vp} + \mathbf{K}\_{vi}}{\mathbf{s}} (\mathbf{v}\_{ad}^{\*} - \mathbf{v}\_{od}) \,, \mathbf{i}\_{fibq}^{\*} = \frac{\mathbf{s} \cdot \mathbf{K}\_{vp} + \mathbf{K}\_{vi}}{\mathbf{s}} (\mathbf{v}\_{aq}^{\*} - \mathbf{v}\_{aq}) \tag{19}$$

where Kvp and Kvi are the proportional and integral gains of the voltage feedback control, respectively. The reference current generated by the voltage controller is given by

$$\mathbf{i}^\*\_{\rm vcd} = \mathbf{i}^\*\_{\rm ifd} + \mathbf{i}^\*\_{\rm fbd}, \mathbf{i}^\*\_{\rm vc\eta} = \mathbf{i}^\*\_{\rm ifq} + \mathbf{i}^\*\_{\rm fbq} \tag{20}$$

#### 4.3. Unitary transfer function compensation

Based on Eqs. (16)–(20), the transfer function of the voltage controller is unitary, whereas the transfer functions of the current controller are given by Eq. (15).

In order to improve the system's stability and dynamic performance, it is necessary to make the inner current loop appear as a unitary gain from the perspective of the outer voltage loop. A derivative compensation is used between the voltage controller and the current controller to make the current transfer function also equal to unitary gain. The transfer functions of the derivative compensation are obtained by inverting the inner loop transfer functions represented in Eq. (15)

$$\frac{\mathbf{i}\_{id}^\*}{\mathbf{i}\_{id}^\*} = \frac{\mathbf{i}\_{iq}^\*}{\mathbf{i}\_{ivq}^\*} = \frac{s \cdot L\_f + R\_f + K\_{cp}}{R\_f + K\_{cp}} = D(\mathbf{s}) \tag{21}$$

By substituting Eq. (15) into Eq. (21), the transfer function of the current controller is equal to the unitary gain. In digital implementation, the derivative compensation should operate at the same bandwidth as the voltage control. As we have Rf þ Kcp ≫ Lf , we have i � id i � ivd and i � iq i � ivq. The derivative term would not cause significant distortion in case there is nonlinear load connected.

### 5. Analysis of the voltage control algorithm in the inverter control layer

#### 5.1. Analytical verification of the closed loop transfer function

vod ¼ v�

outer voltage loop are formulated as follows:

v� oq þ ω<sup>o</sup>

4.3. Unitary transfer function compensation

if bd <sup>¼</sup> <sup>s</sup> � Kvp <sup>þ</sup> Kvi

v�

od � Cf

1 þ s � Cf � Rc

Cf 1 þ s � Cf � Rc

<sup>s</sup> <sup>ð</sup>v�

i � vcd ¼ i � if f d þ i � if bd, i�

transfer functions of the current controller are given by Eq. (15).

i � id i � ivd ¼ i � iq i � ivq

i �

i � if f d <sup>¼</sup> <sup>s</sup> � Cf

if f q <sup>¼</sup> <sup>s</sup> � Cf

represented in Eq. (15)

i � iq i �

load connected.

1 þ s � Cf � Rc

88 Development and Integration of Microgrids

1 þ s � Cf � Rc

i � od, voq ¼ v�

CfRc 1 þ s � Cf � Rc

CfRc 1 þ s � Cf � Rc

if bq <sup>¼</sup> <sup>s</sup> � Kvp <sup>þ</sup> Kvi

iiq � ω<sup>o</sup>

iid þ ω<sup>o</sup>

<sup>s</sup> <sup>ð</sup>v�

Therefore, the same strategy will be applied in the design of the voltage control law. The control algorithm is obtained by substituting Eqs. (4) and (5) into Eq. (16) and rearranging in terms of the reference for the inverter current. As shown in Figures 3 and 4, the voltage controller includes both feedforward control and feedback control. The control laws of the

voq þ ω<sup>o</sup>

vod � ω<sup>o</sup>

where Kvp and Kvi are the proportional and integral gains of the voltage feedback control,

Based on Eqs. (16)–(20), the transfer function of the voltage controller is unitary, whereas the

In order to improve the system's stability and dynamic performance, it is necessary to make the inner current loop appear as a unitary gain from the perspective of the outer voltage loop. A derivative compensation is used between the voltage controller and the current controller to make the current transfer function also equal to unitary gain. The transfer functions of the derivative compensation are obtained by inverting the inner loop transfer functions

> <sup>¼</sup> <sup>s</sup> � Lf <sup>þ</sup> Rf <sup>þ</sup> Kcp Rf þ Kcp

By substituting Eq. (15) into Eq. (21), the transfer function of the current controller is equal to the unitary gain. In digital implementation, the derivative compensation should operate at

ivq. The derivative term would not cause significant distortion in case there is nonlinear

the same bandwidth as the voltage control. As we have Rf þ Kcp ≫ Lf , we have i

vcq ¼ i � if f q þ i �

od � vodÞ, i�

respectively. The reference current generated by the voltage controller is given by

oq ð16Þ

CfRc 1 þ s � Cf � Rc

CfRc 1 þ s � Cf � Rc

oq � voqÞ ð19Þ

if bq ð20Þ

¼ DðsÞ ð21Þ

� id i � ivd and

iod þ iod

iod þ ioq

ð17Þ

ð18Þ

Analytical verification is provided here to derive the closed loop transfer function of the inverter control layer, and to prove that the design target is satisfied. A simplified structure of the double-loop controller is presented in Figure 7. W1 represents the control plant of the inner loop and its formula is shown in Eq. (6) and (7). W2 represents the control plant of the outer loop and its formula is shown in Eq. (8) and (9). Only derivation process in d-coordinate is presented and it is shown in Figure 8. Following the steps listed in Figure 8, we can obtain the closed loop transfer as designed, vodðsÞ ¼ v� odðsÞ.

Figure 7. Simplified structure of the control algorithm in the inverter layer.

Figure 8. The derivation process of the closed loop transfer function.

#### 5.2. Sensitivity analysis

The developed voltage control algorithm in the inverter layer is model-based control method, which requires very accurate modelling of the control plant together with correct parameters. If there is mismatch between the estimated plant parameter and the real one, the reverse model would not perfectly compensate for the plant's dynamics and transform the open loop into a unitary gain. As a result, disturbance terms would appear in the closed loop transfer function, which degrades the steady-state and transient performance. In this sensitivity analysis, how the stability and control performance of the proposed controller is affected by the variations of the control plant parameters (e.g. Cf and Lf) is investigated.

Assuming that the capacitance of the physical plant is Cf and the estimated capacitance of the inverse dynamic model for the control system is C´ <sup>f</sup>, we can derive the following closed loop transfer function:

$$\upsilon\_{ad} = \upsilon\_{ad}^{\*} + \frac{\left(\frac{\mathbf{C}\_{f}^{\prime}}{\mathbf{C}\_{f}} - 1\right)\mathbf{s}}{(\mathbf{C}\_{f}^{\prime} + \mathbf{K}\_{vp}\mathbf{C}\_{f}^{\prime}\mathbf{R}\_{c})\mathbf{s}^{2} + (\mathbf{K}\_{vp} + \mathbf{K}\_{vi}\mathbf{C}\_{f}^{\prime}\mathbf{R}\_{c})\mathbf{s} + \mathbf{K}\_{vi}}(\mathbf{i}\_{id} - \mathbf{i}\_{od}) \tag{22}$$

From Eq. (22), it can be seen that the output vod is a function of the reference input v\*od and the disturbance iid-iod. The system stability is not degraded by variations of Cf as that the poles of the transfer function for the disturbance iid-iod are always in the left-half-plane regardless of variations of Cf. The closed loop performance is evaluated by the magnitude bode diagram of the transfer function for the disturbance for different Cf values, as shown in Figure 9. It can

Figure 9. Gain magnitude curve of disturbance (iid-iod) caused by Cf variation.

be observed that the effect of modelling mismatch caused by variations of Cf is very small since the gain magnitude is below �15 dB for all frequencies.

If the inductance of the real plant is Lf and the inductance of the inverse dynamic model is L´ f, the transfer function of the inner current loop is given by

$$\dot{\mathbf{u}}\_{\rm id} = \frac{L\_f'\mathbf{s} + \mathbf{R}\_f + \mathbf{K}\_{\rm cp}}{L\_f\mathbf{s} + \mathbf{R}\_f + \mathbf{K}\_{\rm cp}} \mathbf{i}\_{\rm id}^\* + \frac{\alpha\_o(L\_f - L\_f')}{L\_f\mathbf{s} + \mathbf{R}\_f + \mathbf{K}\_{\rm cp}} \mathbf{i}\_{\rm iq} \tag{23}$$

and the derivative compensation term is

5.2. Sensitivity analysis

90 Development and Integration of Microgrids

transfer function:

The developed voltage control algorithm in the inverter layer is model-based control method, which requires very accurate modelling of the control plant together with correct parameters. If there is mismatch between the estimated plant parameter and the real one, the reverse model would not perfectly compensate for the plant's dynamics and transform the open loop into a unitary gain. As a result, disturbance terms would appear in the closed loop transfer function, which degrades the steady-state and transient performance. In this sensitivity analysis, how the stability and control performance of the proposed controller is affected by the variations of

Assuming that the capacitance of the physical plant is Cf and the estimated capacitance of the

C0 f Cf � 1 

fRcÞs<sup>2</sup> þ ðKvp þ KviC<sup>0</sup>

From Eq. (22), it can be seen that the output vod is a function of the reference input v\*od and the disturbance iid-iod. The system stability is not degraded by variations of Cf as that the poles of the transfer function for the disturbance iid-iod are always in the left-half-plane regardless of variations of Cf. The closed loop performance is evaluated by the magnitude bode diagram of the transfer function for the disturbance for different Cf values, as shown in Figure 9. It can

**103**

**<sup>10</sup><sup>5</sup> -60**

**Frequency (Hz)**

s

<sup>f</sup>, we can derive the following closed loop

ðiid � iodÞ ð22Þ

fRcÞs þ Kvi

**80%Cf 90%Cf 110% Cf 120% Cf**

**104**

the control plant parameters (e.g. Cf and Lf) is investigated.

inverse dynamic model for the control system is C´

od þ

**102**

Figure 9. Gain magnitude curve of disturbance (iid-iod) caused by Cf variation.

**-55**

**-50**

**-45**

**-40 -35**

**Magnitude (dB)**

**-30**

**-25**

**-20**

**-15 -10** ðC0

<sup>f</sup> þ KvpC<sup>0</sup>

vod ¼ v�

$$D'(s) = \frac{\mathbf{i}\_i^\*}{\mathbf{i}\_{vc}^\*} = \frac{sL'\_f + \mathbf{R}\_f + \mathbf{K}\_{cp}}{\mathbf{R}\_f + \mathbf{K}\_{cp}} \tag{24}$$

Therefore, the closed loop transfer function of the whole system is given by

$$\mathbf{w}\_{ad} = \frac{A(\mathbf{s}) + B(\mathbf{s})}{1 + B(\mathbf{s})} \mathbf{v}\_{ad}^\* - \frac{(1 + \mathbf{s}\mathbb{C}\_f \mathbf{R}\_c)(1 - A(\mathbf{s}))}{\mathbf{s}\mathbb{C}\_f (1 + B(\mathbf{s}))} \mathbf{i}\_{ad} + \frac{w\_o (1 + \mathbf{s}\mathbb{C}\_f \mathbf{R}\_c)(\mathbf{L}\_f - \mathbf{L}\_f')}{\mathbf{s}\mathbb{C}\_f (1 + B(\mathbf{s}))(\mathbf{L}\_f \mathbf{s} + \mathbf{R}\_f + \mathbf{K}\_{cp})} \mathbf{i}\_{\mathbf{i}\eta} \tag{25}$$

where <sup>A</sup>ðsÞ ¼ <sup>ð</sup>Rf <sup>þ</sup>KcpþsLf <sup>Þ</sup> 2 ðRf þKcpþsLfÞðRf þKcpÞ , <sup>B</sup>ðsÞ ¼ <sup>1</sup>þsCf Rc sCf AðsÞ KvpsþKvi <sup>s</sup> .

The stability of the system is studied by checking the position of the poles of each input expressed in Eq. (25) (vod\* , iod, iiq) when Lf varies from 80 to 120% of L´ <sup>f</sup>. The results show that all the components have the same dominant poles (�409) with variations of Lf. Consequently, the stability of system is not degraded with mismatches between Lf and L´ <sup>f</sup>. The closed loop performance of the system is analysed with the bode plots for each individual input in Eq. (25). It can be observed in Figure 10(a) that the gain for the reference tracking at the fundamental frequency is equal to the unitary gain. The magnitude of the disturbance caused by the output current iod is very low over the frequency range of interest, so that it has little influence on the system's performance. The magnitude of the disturbance caused by the coupling component iiq is also quite low and almost negligible over the frequency range of interest.

The sensitivity study to variations of Cf and Lf indicates that the stability of the system will not be degraded. However, variations of plant parameter make the system unable to suppress

Figure 10. Gain magnitude curves of components of vod caused by Lf variation. (a) Gain of v\* od. (b) Gain of iod. (c) Gain of iiq.

completely all disturbances and degrade the system's reference tracking and disturbance rejection performance. The performance loss, however, is small and acceptable for practical applications.

#### 5.3. Comparison with the conventional voltage controller

For comparison purpose, analysis is also carried out with the cascaded voltage controller proposed in Refs. [2, 6], which is a popularly employed controller in academic and industry. The structure of this conventional voltage controller is shown in [4]. This conventional controller requires the same number of sensors as the proposed controller. The analysis starts from the inner loop current controller. Based on vi ¼ v� <sup>i</sup> , we obtain the following equation (only equation in d-axis is shown here):

$$(\mathbf{s}L\_f + \mathbf{R}\_f)\mathbf{i}\_{\rm id} - \omega\_o L\_f \mathbf{i}\_{\rm iq} + \mathbf{v}\_{\rm ad} = K\_{\rm cp}(\mathbf{i}\_{\rm id}^\* - \mathbf{i}\_{\rm id}) - \omega\_o L\_f \mathbf{i}\_{\rm iq} + \mathbf{v}\_{\rm ad} \tag{26}$$

After rearranging the above equation, we obtain the closed loop transfer function of the inner loop

$$\frac{i\_{id}}{i\_{id}^\*} = \frac{K\_{cp}}{sL\_f + R\_f + K\_{cp}} \to i\_{id} = i\_{id}^\* \frac{K\_{cp}}{sL\_f + R\_f + K\_{cp}} \tag{27}$$

According to the control law for the outer voltage loop, we have

$$\dot{q}\_{id}^{\*} = \frac{K\_{vp} + sK\_{vi}}{s} (\upsilon\_{od}^{\*} - \upsilon\_{od}) - \omega\_o \mathbb{C}\_f \upsilon\_{oq} + \dot{\mathfrak{i}}\_{od} \tag{28}$$

Substituting Eq. (28) into Eq. (27), we obtain the following equation:

$$\dot{q}\_{id} = \left(\frac{\mathcal{K}\_{vp} + s\mathcal{K}\_{vi}}{s}(\upsilon\_{ad}^\* - \upsilon\_{od}) - a\upsilon\_b \mathcal{C}\_f \upsilon\_{aq} + \dot{\upsilon}\_{ad}\right) \frac{\mathcal{K}\_{cp}}{s\mathcal{L}\_f + \mathcal{R}\_f + \mathcal{K}\_{cp}}\tag{29}$$

Based on the dynamic model of the outer voltage loop, we have the following equation:

$$\dot{\mathbf{u}}\_{id} = \mathbf{s} \mathbf{C}\_f \mathbf{v}\_{od} + \dot{\mathbf{i}}\_{od} - \omega\_o \mathbf{C}\_f \mathbf{v}\_{oq} \tag{30}$$

Following the same logic as the inner loop, we have the following equation:

$$\left(\frac{\mathcal{K}\_{vp} + \mathcal{S}\mathcal{K}\_{vi}}{\mathcal{s}} (\boldsymbol{\upsilon}\_{ad}^{\*} - \boldsymbol{\upsilon}\_{ad}) - \boldsymbol{\omega}\_{o}\mathsf{C}\_{f}\boldsymbol{\upsilon}\_{aq} + \boldsymbol{i}\_{ad}\right) \frac{\mathcal{K}\_{cp}}{\mathcal{s}\mathcal{L}\_{f} + \mathcal{R}\_{f} + \mathcal{K}\_{cp}} = \mathsf{s}\mathsf{C}\_{f}\boldsymbol{\upsilon}\_{ad} + \boldsymbol{i}\_{ad} - \boldsymbol{\omega}\_{o}\mathsf{C}\_{f}\boldsymbol{\upsilon}\_{aq} \tag{31}$$

By rearranging the equation, we obtain the closed loop transfer function for the entire system

$$
\sigma v\_{od} = \frac{B\_1}{A\_1} \upsilon\_{od}^\* + \frac{C\_1}{A\_1} i\_{od} + \frac{D\_1}{A\_1} v\_{oq} \tag{32}
$$

$$\begin{cases} \text{where} \quad A\_1 = \mathsf{C}\_f L\_f \mathsf{s}^3 + \mathsf{C}\_f (\mathsf{R}\_f + \mathsf{K}\_{cp}) \mathsf{s}^2 + \mathsf{K}\_{cp} \mathsf{K}\_{vp} \mathsf{s} + \mathsf{K}\_{cp} \mathsf{K}\_{vi} & \mathcal{B}\_1 = \mathsf{K}\_{cp} \mathsf{K}\_{vp} \mathsf{s} + \mathsf{K}\_{cp} \mathsf{K} \mathsf{s}\_{i\prime} & \mathsf{C}\_1 = -\mathsf{L}\_f \mathsf{s}^2 + \mathsf{L}\_{cp} \mathsf{s}^2 + \mathsf{L}\_{cp} \mathsf{K}\_{cp} \\ \left(\frac{\mathsf{K}\_{cp}}{\mathsf{s}L\_f + \mathsf{R}\_f + \mathsf{K}\_{cp}} \mathsf{K}\_{cp} - \mathsf{R}\_f - \mathsf{K}\_{cp}\right) \mathsf{s} \text{ and } \mathcal{D}\_1 = \omega\_o L\_f \mathsf{C}\_f \mathsf{s}^3 + \omega\_o \mathsf{R}\_f \mathsf{C}\_f \mathsf{s}^2. \end{cases}$$

completely all disturbances and degrade the system's reference tracking and disturbance rejection performance. The performance loss, however, is small and acceptable for practical

For comparison purpose, analysis is also carried out with the cascaded voltage controller proposed in Refs. [2, 6], which is a popularly employed controller in academic and industry. The structure of this conventional voltage controller is shown in [4]. This conventional controller requires the same number of sensors as the proposed controller. The analysis starts from the

After rearranging the above equation, we obtain the closed loop transfer function of the inner

! iid ¼ i � id

od � vodÞ � ωoCf voq þ iod Kcp

sLf þ Rf þ Kcp

Based on the dynamic model of the outer voltage loop, we have the following equation:

By rearranging the equation, we obtain the closed loop transfer function for the entire system

Following the same logic as the inner loop, we have the following equation:

vod <sup>¼</sup> <sup>B</sup><sup>1</sup> A1 v� od þ C1 A1 iod þ D<sup>1</sup> A1

od � vodÞ � ωoCf voq þ iod Kcp

�

Kcp sLf þ Rf þ Kcp

<sup>i</sup> , we obtain the following equation (only equa-

od � vodÞ � ωoCf voq þ iod ð28Þ

sLf þ Rf þ Kcp

¼ sCf vod þ iod � ωoCf voq ð31Þ

voq ð32Þ

iid ¼ sCf vod þ iod � ωoCf voq ð30Þ

id � iidÞ � ωoLf iiq þ vod ð26Þ

ð27Þ

ð29Þ

5.3. Comparison with the conventional voltage controller

ðsLf þ RfÞiid � ωoLf iiq þ vod ¼ Kcpði

<sup>¼</sup> Kcp sLf þ Rf þ Kcp

According to the control law for the outer voltage loop, we have

id <sup>¼</sup> Kvp <sup>þ</sup> sKvi

Substituting Eq. (28) into Eq. (27), we obtain the following equation:

<sup>s</sup> <sup>ð</sup>v�

<sup>s</sup> <sup>ð</sup>v�

inner loop current controller. Based on vi ¼ v�

iid i � id

> i �

iid <sup>¼</sup> Kvp <sup>þ</sup> sKvi

tion in d-axis is shown here):

92 Development and Integration of Microgrids

Kvp þ sKvi <sup>s</sup> <sup>ð</sup>v�

applications.

loop

As seen from Eq. (32), the output voltage vod is a function of the reference input v� od and two disturbance inputs iod and voq. The two disturbance inputs result in static error and harmonics distortion in the output voltage. Figure 11 shows the bode plot of the gain of each input. Figure 11(a) displays the bode diagram of output voltage to voltage reference closed loop transfer function. It demonstrates that the output voltage can track the reference very well at the fundamental frequency. However, it may amplify the harmonics with frequency around 550 Hz if there are harmonics in the reference voltage. This may happen due to the voltage reference in some applications generated based on some measured variables and power references rather than a fixed value. If there are distortions in the grid, the measured variables can be distorted and then the generated voltage reference can be distorted as well. The gain of iod represents the equivalent harmonic impedance which indicates the main reason of the steadystate error in tracking the target reference. The bode diagram shown in Figure 11(b) indicates that the harmonics with frequency around 550 Hz (resonance peak) in the output current will be significantly amplified and results in large distortion in the output voltage. The decoupling

Figure 11. Analytical study of the conventional double-loop voltage controller. (a) Bode plot of the gain of vod. (b) Bode plot of the gain of iod. (c) Bode plot of the gain of voq. (d) Equivalent circuit of the closed loop system.

term of the output voltage voq has negligible impact on the output voltage as seen from Figure 11(c). Hence, the output voltage of inverter can be treated as a voltage source series connected with output impedance, which is represented in Figure 5.9(d). GðsÞ is equal to <sup>B</sup><sup>1</sup> <sup>A</sup><sup>1</sup> and ZðsÞ is equal to �C<sup>1</sup> <sup>A</sup><sup>1</sup> . In order to achieve fast dynamic response and eliminate steady-state error and voltage distortions, the output impedance should be as small as possible [2, 11].

For the proposed voltage controller, the output impedance is equal to 'zero' which therefore predicts superior control performance compared to the conventional voltage controller. For instance, the tracking error for steady-state and transient moment is forced to be 'zero' in a symmetric and non-distorted grid. However, the proposed control method contains derivative part in the current reference generation which affects not only the feedforward term of the current controller but also the feedback controller. In fact, the analysis shown in Ref. [5] proves that the proposed method has good robustness against harmonic distortion.

### 6. Results and discussion

The variation of the developed control algorithm was conducted by simulating a microgrid with two inverter-interfaced DGs whose specifications are described in Ref. [5]. Figure 12 shows the topology of the microgrid for the case study. In the application layer, the voltage reference generation algorithms for the three operating modes are running parallel to prevent the latter to start from scratch after every transition. Before connection/disconnection microgrid to the main grid, the angle difference between grid-forming and grid-supporting/ grid feeding (θinv-θg) is compared to guarantee small phase/frequency deviations.

The European Standard EN 50160 defines standard operating conditions of frequency and voltage for islanded and interconnected power systems [12] . Assuming that the nominal root-mean-square (RMS) voltage is 230 V, the RMS value of voltage for interconnected systems should maintain between 207 and 253 V (�10%), whereas for islanded systems, it should be between 195.5 and 253 V (�15%). In terms of frequency, for interconnected systems, it should remain in the range of 49.5 and 50.5 Hz (�1%), and in the range of 49 and 51 Hz for islanded systems (�2%). These standard operating limits are used to evaluate the work in this chapter.

Figure 12. Microgrid configuration used as a case study [5].

#### 6.1. Simulation results

<sup>A</sup><sup>1</sup> and

term of the output voltage voq has negligible impact on the output voltage as seen from Figure 11(c). Hence, the output voltage of inverter can be treated as a voltage source series connected with output impedance, which is represented in Figure 5.9(d). GðsÞ is equal to <sup>B</sup><sup>1</sup>

For the proposed voltage controller, the output impedance is equal to 'zero' which therefore predicts superior control performance compared to the conventional voltage controller. For instance, the tracking error for steady-state and transient moment is forced to be 'zero' in a symmetric and non-distorted grid. However, the proposed control method contains derivative part in the current reference generation which affects not only the feedforward term of the current controller but also the feedback controller. In fact, the analysis shown in Ref. [5] proves

The variation of the developed control algorithm was conducted by simulating a microgrid with two inverter-interfaced DGs whose specifications are described in Ref. [5]. Figure 12 shows the topology of the microgrid for the case study. In the application layer, the voltage reference generation algorithms for the three operating modes are running parallel to prevent the latter to start from scratch after every transition. Before connection/disconnection microgrid to the main grid, the angle difference between grid-forming and grid-supporting/

The European Standard EN 50160 defines standard operating conditions of frequency and voltage for islanded and interconnected power systems [12] . Assuming that the nominal root-mean-square (RMS) voltage is 230 V, the RMS value of voltage for interconnected systems should maintain between 207 and 253 V (�10%), whereas for islanded systems, it should be between 195.5 and 253 V (�15%). In terms of frequency, for interconnected systems, it should remain in the range of 49.5 and 50.5 Hz (�1%), and in the range of 49 and 51 Hz for islanded systems (�2%). These standard operating limits are used to evaluate the work in this chapter.

grid feeding (θinv-θg) is compared to guarantee small phase/frequency deviations.

and voltage distortions, the output impedance should be as small as possible [2, 11].

that the proposed method has good robustness against harmonic distortion.

<sup>A</sup><sup>1</sup> . In order to achieve fast dynamic response and eliminate steady-state error

ZðsÞ is equal to �C<sup>1</sup>

94 Development and Integration of Microgrids

6. Results and discussion

Figure 12. Microgrid configuration used as a case study [5].

#### 6.1.1. Grid-supporting to grid-forming mode

When a fault is detected in the main grid during the grid-supporting operation, it requests the microgrid to disconnect from the main grid. In this scenario, the transient behaviour of the DGs controlled with the developed algorithm is investigated. The maximum amounts of active power injections of the DGs running in grid-supporting mode are 20 kW for DG#1 and 15 kW for DG#2. The two DGs are connected to the main grid at 0.6 s to prevent the transients from the black start and phase-lock-loop (PLL) is used to synchronize each DG with the grid before connection. From 0 to 0.6 s, the controllers of DGs are pending to run in grid-supporting mode while the references Pmax are set to be 'zero'. The DGs work in grid-supporting mode from 0.6 to 3.8 s, then they switch to grid-forming mode after the microgrid disconnects from the main grid. The transient behaviours of the DGs are presented in Figure 13.

Figure 13(a) indicates that the two DGs can inject maximum amount of active power (20 and 15 kW, respectively) in the grid-supporting mode, and achieve accurate power sharing (15 kW) in the grid-forming mode. The output voltages of both DGs during operating mode transition, as illustrated in Figure 13(b), indicate that the two DGs exhibit neither overshooting nor harmful transient in voltage, and that both rapidly arrive at the steady state. Figure 13(c)

Figure 13. Transient performance from grid-supporting mode to grid-forming mode. (a) Active and reactive power of DGs. (b) Output voltage of DGs during mode change. (c) Zoomed-in plot of output voltage of DGs at transient moment. (d) DG#1: reference signal (red), actual output (blue) of voltage controller and current controller in d -q frame. | RMS voltage and frequency of DGs.

shows the zoomed-in plot of output voltage of DGs at the transition moment (3.8 s); negligible transients are observed for both DGs at the transition moment. Thus, very smooth transition performances are achieved as expected. The frequency of DGs shown in Figure 13 (e) also indicates the smooth transition process. The tracking performance of the inner and outer loop of DG#1 is presented in Figure 13(d). The upper graph of Figure 13(e) illustrates that the voltages of both DGs lie inside the satisfactory limits in both grid-supporting and grid-forming mode. Moreover, the transient voltages remain within the required operating limits of the islanded microgrid. The lower graph of Figure 13(e) illustrates the frequency at the moment of transition. In less than 0.2 s, the two DGs accomplish accurate power sharing and arrive at the identical frequency of 49.76 Hz, which lies within the required operating limits. Furthermore, the largest frequency variation of the two DGs at the moment of transition is 49.52 Hz, which does not violate the operating range of EN 50160. The results show that the controlled variables can perfectly track their respective reference with zero steadystate error during steady state and transient. This is consistent with the specification set in Section 4 that the transfer functions of the inner and outer loops are both equivalent to the unitary gain.

### 6.1.2. Grid-supporting to grid-forming mode

In this test scenario, the two DGs are switched intentionally from grid-forming mode to gridfeeding mode at 2 s, when the phase differences of voltages between the main grid and the DGs are lower than 0.5 rad. In grid-feeding mode, the received active and reactive power references from the system control layer are 15 kW and 200 Var for DG#1, and 15 kW and 300 Var for DG#2. Figure 14 shows the simulation results. Figure 14(a) illustrates the process of the inverters synchronizing with the grid. As it can be seen, the voltages of DG#1 and DG#2 can be synchronized with the grid voltage very rapidly and with small negligible transient after the switch is reconnected, thanks to fast dynamics and good disturbance rejection performance of the proposed method. Figure 14(c) presents the performance of the developed outer voltage and inner current controller. We can observe that each of the actual output variables follows the corresponding reference target perfectly; this confirms the validity of the design laid out in Section 4. The output current of DG#1 presented in Figure 14(e) shows the smooth transient performance of the microgrid.

The same test is investigated with the conventional method shown in Ref. [5] for comparing the controller performances (performance in steady state and transient state) with the developed control method. Figure 14 shows the simulation results. Figure 14(b) illustrates that though DG#1 is able to synchronize with the main grid very rapidly, larger transient is exhibited; Figure 14(d) demonstrates that there are some tracking errors with respect to the reference and real output, and large transient currents shown at the transition moment, and Figure 14(f) further shows the undesirable transient current as well. Compared with the results in Figure 14(b), (d) and (f), the proposed method has smaller transient current during transition and better tracking and disturbance rejection performances.

The DG's output voltages in RMS values are shown at the top and the frequency is shown at the bottom of Figure 15. As seen from Figure 15, the RMS values of voltage and the frequencies

A Generalized Voltage Control Algorithm for Smooth Transition Operation of Microgrids http://dx.doi.org/10.5772/intechopen.69402 97

Figure 14. Transient performance from grid-forming mode to grid-feeding mode: proposed method (left column) and conventional method (right column). (a, b) Up: Grid voltage (blue) and inverter voltage (red) Down: Error between grid and inverter voltage. (c, d) DG#1: Reference signal (red), actual output (blue) of voltage controller and current controller in d-q frame. (e, f) Output current of DG#1.

of the DGs are near their nominal values pre- and post transition. As per the standard EN 50160, the DGs´ voltage and frequency both lie within the satisfactory operating ranges.

#### 6.2. Experimental results

shows the zoomed-in plot of output voltage of DGs at the transition moment (3.8 s); negligible transients are observed for both DGs at the transition moment. Thus, very smooth transition performances are achieved as expected. The frequency of DGs shown in Figure 13 (e) also indicates the smooth transition process. The tracking performance of the inner and outer loop of DG#1 is presented in Figure 13(d). The upper graph of Figure 13(e) illustrates that the voltages of both DGs lie inside the satisfactory limits in both grid-supporting and grid-forming mode. Moreover, the transient voltages remain within the required operating limits of the islanded microgrid. The lower graph of Figure 13(e) illustrates the frequency at the moment of transition. In less than 0.2 s, the two DGs accomplish accurate power sharing and arrive at the identical frequency of 49.76 Hz, which lies within the required operating limits. Furthermore, the largest frequency variation of the two DGs at the moment of transition is 49.52 Hz, which does not violate the operating range of EN 50160. The results show that the controlled variables can perfectly track their respective reference with zero steadystate error during steady state and transient. This is consistent with the specification set in Section 4 that the transfer functions of the inner and outer loops are both equivalent to the

In this test scenario, the two DGs are switched intentionally from grid-forming mode to gridfeeding mode at 2 s, when the phase differences of voltages between the main grid and the DGs are lower than 0.5 rad. In grid-feeding mode, the received active and reactive power references from the system control layer are 15 kW and 200 Var for DG#1, and 15 kW and 300 Var for DG#2. Figure 14 shows the simulation results. Figure 14(a) illustrates the process of the inverters synchronizing with the grid. As it can be seen, the voltages of DG#1 and DG#2 can be synchronized with the grid voltage very rapidly and with small negligible transient after the switch is reconnected, thanks to fast dynamics and good disturbance rejection performance of the proposed method. Figure 14(c) presents the performance of the developed outer voltage and inner current controller. We can observe that each of the actual output variables follows the corresponding reference target perfectly; this confirms the validity of the design laid out in Section 4. The output current of DG#1 presented in Figure 14(e) shows the smooth

The same test is investigated with the conventional method shown in Ref. [5] for comparing the controller performances (performance in steady state and transient state) with the developed control method. Figure 14 shows the simulation results. Figure 14(b) illustrates that though DG#1 is able to synchronize with the main grid very rapidly, larger transient is exhibited; Figure 14(d) demonstrates that there are some tracking errors with respect to the reference and real output, and large transient currents shown at the transition moment, and Figure 14(f) further shows the undesirable transient current as well. Compared with the results in Figure 14(b), (d) and (f), the proposed method has smaller transient current during

The DG's output voltages in RMS values are shown at the top and the frequency is shown at the bottom of Figure 15. As seen from Figure 15, the RMS values of voltage and the frequencies

transition and better tracking and disturbance rejection performances.

unitary gain.

6.1.2. Grid-supporting to grid-forming mode

96 Development and Integration of Microgrids

transient performance of the microgrid.

All simulations are performed in a hardware-in-the-loop (HIL) platform, and practical implementations such as delays caused by digital sampling, computation time and inverter switching are included. The structure including system layer, application layer, inverter control layer and switching layer is presented in Figure 16.

The microgrid with two inverter-interfaced DGs and the main grid model is built in a real-time digital simulator (RTDS). The application and inverter layer control algorithms have been programmed using Texas Instrument TMS28335 DSP. Each inverter is controlled using one DSP. There is a conditioning interface between RTDS and DSP to scale the output voltage level of RTDS (5 V) to the output voltage level of DSP (0–3.3 V), and vice versa. The system layer controller is implemented in a Xilinx ML507 board; the board directly communicates with a RTDS gigahertz processor card through fibre optics to obtain measurements and transmit the

Figure 15. DGs' output voltage RMS values and frequencies.

Figure 16. The structure of the universal control algorithm for flexible microgrid operation.

PCC circuit breaker control signal to RTDS. A control algorithm in the system layer, consisting of operating mode management and control reference generation, is implemented in ML507, and the operation mode signal and power references are sent to DSPs via serial peripheral interface. The algorithms implemented in the application layer are grid-forming (top), grid-feeding (middle) and grid-supporting (bottom), respectively, and the output is the voltage reference for the inverter layer. The schematic diagram and setup of HIL platform are presented in Figure 17. In this signal HIL platform, both the ML507 board and DSP board are controlled under test. The oscilloscope panels related show 5 V for 400-V voltage and 5 V for 50-A current.

#### 6.2.1. Transition from grid-supporting to grid-forming mode

The two DGs begin in grid-supporting mode (the command signal sent from ML507 to RTDS is '1' and from ML507 to DSPs is '10'). The algorithm of grid-supporting mode in application A Generalized Voltage Control Algorithm for Smooth Transition Operation of Microgrids http://dx.doi.org/10.5772/intechopen.69402 99

Figure 17. (a) Schematic diagram of the signal level HIL platform. (b) Set-up of HIL platform.

layer is selected and the voltage reference is passed to the inverter control layer. After letting the system run for a pre-defined time, the microgrid is intentionally switched to islanding mode by transmitting '00' to DSPs and '0' to RTDS from ML507. Then, the grid-forming mode in the application layer algorithm is selected to produce the voltage reference for the inverter control layer, and a new angle θinv for Park transformation is also transmitted to the inverter control layer. Figure 18 presents details of the DGs' performance, showing the responses of the voltage and current during the transition between the two operating modes [5].

No transient change is shown in the voltage waveform and only very slight transients are exhibited in the current waveform. The calculated frequencies of both DGs are approximately 50 Hz in grid-supporting mode and 49.7 Hz in grid-forming mode, with the largest deviation during transition being 0.35 Hz. The calculated RMS values of voltage remain within the acceptable range around the rated value of 230 V during the transition process, with negligible deviations. Therefore, the expected smooth transition from grid-supporting mode to gridforming mode is achieved with the proposed control algorithm, and the operating range of DGs´ frequencies and voltages is within the range as per EN 50160.

#### 6.2.2. Transition between grid-forming and grid-feeding mode

PCC circuit breaker control signal to RTDS. A control algorithm in the system layer, consisting of operating mode management and control reference generation, is implemented in ML507, and the operation mode signal and power references are sent to DSPs via serial peripheral interface. The algorithms implemented in the application layer are grid-forming (top), grid-feeding (middle) and grid-supporting (bottom), respectively, and the output is the voltage reference for the inverter layer. The schematic diagram and setup of HIL platform are presented in Figure 17. In this signal HIL platform, both the ML507 board and DSP board are controlled under test. The

The two DGs begin in grid-supporting mode (the command signal sent from ML507 to RTDS is '1' and from ML507 to DSPs is '10'). The algorithm of grid-supporting mode in application

oscilloscope panels related show 5 V for 400-V voltage and 5 V for 50-A current.

Figure 16. The structure of the universal control algorithm for flexible microgrid operation.

6.2.1. Transition from grid-supporting to grid-forming mode

Figure 15. DGs' output voltage RMS values and frequencies.

98 Development and Integration of Microgrids

Two scenarios are studied in this case: the transition from grid-forming to grid-feeding mode requested by the DNO, and the opposite situation, the transition from grid-feeding mode to grid-forming mode caused by intentional islanding of the microgrid. During the first transition, the system controller sends operating mode signal '0' to RTDS and '00' to DSP, after which the voltage reference from grid-forming mode and angle θinv is calculated and sent to the inverter

Figure 18. Transition from grid-supporting to grid-forming mode. (a) Voltage response during transition. (b) Current response during transition.

control layer. In addition, the difference in angle between the main grid voltage and DG#1 output voltage is compared. The microgrid will only be connected (reconnected) to the main grid when an 'enable' signal ('1') is transmitted from the system controller to the main grid (modelled and controlled in RTDS) and also the difference in angle is equal to or less than 0.5 rad. When these conditions are met, the system layer controller transmits '1' to RTDS, and '01' and power references to DSPs, which commands the inverters to operate in grid-feeding mode. Then, after a pre-defined time, the system layer controller transfers intentionally the microgrid to islanding mode, and the corresponding command signals are transmitted to DSPs and RTDS.

The control performance of the developed control algorithm is compared to the popularly used control algorithm presented in Ref. [6]. To attain valid simulation results, the operating conditions for the two algorithms are made identical. The microgrid is connected to the main grid when the phase difference between the grid voltage and the voltage at the terminal of DG#1 is equal to or less than 0.5 rad. Then, the two DGs transfer from grid-forming to grid-feeding mode [5]. After certain time (235 s), the microgrid is disconnected from the main grid, switching the two DGs back to grid-forming mode. The waveforms of voltage and current for both scenarios are different during transition moment because the DSP boards don't start to run at the same time after RTDS is running. However, the switching conditions (e.g. phase difference between main grid voltage and DG#1 output voltage) are maintained the same for both scenarios.

Figure 19(a) and (b) denotes that both control methods cause negligible distortion of the grid voltage at the moment of transition. This is expected, since the main grid is strong. Figure 19(c) and (d) shows a less distorted current waveform after transition when the proposed control algorithm is applied.

Figure 20 illustrates that at the moment of disconnection, both control algorithms swiftly generate a clean voltage waveform, with a marginally better performance than the conventional

Figure 19. Transition from grid-forming to grid-feeding mode. (a) Voltage response with the proposed method. (b) Voltage response with the conventional method. (c) Current response with the proposed method. (d) Current response with conventional method.

A Generalized Voltage Control Algorithm for Smooth Transition Operation of Microgrids http://dx.doi.org/10.5772/intechopen.69402 101

Figure 20. Transition from grid-feeding to grid-forming mode. (a) Voltage response with the proposed method. (b) Voltage response with the conventional method. (c) Current response with the proposed method. (d) Current response with conventional method.

method. In addition, the output currents of the developed control algorithm exhibit considerably superior qualities with fewer overshoots and quicker dynamic responses.

The calculated RMS values of voltage and frequencies of the two DGs with the developed control method during the transition process between grid-forming and grid-feeding modes are summarized as follows: in transition from grid-forming to grid-feeding mode, the calculated frequencies of the two DGs are approximately 49.7 Hz in grid-forming mode and 50 Hz in grid-supporting mode, with the largest deviation during transition being 0.45 Hz, from DG#2 [5]. The calculated RMS values of voltage remain within the acceptable range around the rated value of 230 V during the transition process, with the largest deviation being less than 5 V, from DG#2; in the transition from grid-feeding to grid-forming mode, the calculated RMS values of voltage and frequencies of the two DGs are within the acceptable operating range. Note that the largest deviations of frequency and voltage are 0.6 Hz and 7.5 V, respectively, from DG#1. The results indicate that the standard EN 50160 is respected and smooth transition behaviours of DGs are achieved. A small test is performed to compare the computation time of the proposed method and conventional method. The results show that the total sampling and calculation time is 48 μs for the proposed controller and 37 μs for the conventional controller. This indicates that the control complexity of the proposed controller is comparable with that of the conventional controller. The sampling interval is 300 μs which is long enough for both controllers to accomplish the sampling and computation.

#### 7. Summary

control layer. In addition, the difference in angle between the main grid voltage and DG#1 output voltage is compared. The microgrid will only be connected (reconnected) to the main grid when an 'enable' signal ('1') is transmitted from the system controller to the main grid (modelled and controlled in RTDS) and also the difference in angle is equal to or less than 0.5 rad. When these conditions are met, the system layer controller transmits '1' to RTDS, and '01' and power references to DSPs, which commands the inverters to operate in grid-feeding mode. Then, after a pre-defined time, the system layer controller transfers intentionally the microgrid to islanding mode, and the corresponding command signals are transmitted to DSPs and RTDS.

The control performance of the developed control algorithm is compared to the popularly used control algorithm presented in Ref. [6]. To attain valid simulation results, the operating conditions for the two algorithms are made identical. The microgrid is connected to the main grid when the phase difference between the grid voltage and the voltage at the terminal of DG#1 is equal to or less than 0.5 rad. Then, the two DGs transfer from grid-forming to grid-feeding mode [5]. After certain time (235 s), the microgrid is disconnected from the main grid, switching the two DGs back to grid-forming mode. The waveforms of voltage and current for both scenarios are different during transition moment because the DSP boards don't start to run at the same time after RTDS is running. However, the switching conditions (e.g. phase difference between main grid voltage

Figure 19(a) and (b) denotes that both control methods cause negligible distortion of the grid voltage at the moment of transition. This is expected, since the main grid is strong. Figure 19(c) and (d) shows a less distorted current waveform after transition when the proposed control

Figure 20 illustrates that at the moment of disconnection, both control algorithms swiftly generate a clean voltage waveform, with a marginally better performance than the conventional

Figure 19. Transition from grid-forming to grid-feeding mode. (a) Voltage response with the proposed method. (b) Voltage response with the conventional method. (c) Current response with the proposed method. (d) Current response

and DG#1 output voltage) are maintained the same for both scenarios.

algorithm is applied.

100 Development and Integration of Microgrids

with conventional method.

The developed generalized control algorithm in the inverter control layer of DGs facilitates the seamless transition of microgrids. This is obtained by designing the multi-loop controller in the inverter control layer in such a way that the closed loop dynamics of the inverter together with the LC filter present unitary gain. Thus, the current/voltage disturbances associated with the mode transition are fully cancelled. The proposed voltage control algorithm and the conventional double-loop voltage controller are compared with analytical study and experimental implementation. The output (harmonic) impedance is the cause of the tracking error and distortion caused by the output current. With the proposed voltage controller, the output impedance is 'zero' which theoretically eliminates the tracking error and reduces/eliminates the distortion (can only reduce the distortion in the practical implementation due to the measurement noise, digital quantization errors, etc.). The work has shown that the developed voltage control algorithm has superior control performance than the conventional controller, and it is a high-performance controller, easy to be implemented in the practical application.

### Author details

Jing Wang1,2\* and Bouna Mohamed Cisse3

\*Address all correspondence to: jingwang1108@gmail.com

1 Institute for Automation of Complex Power System, E. ON ERC, RWTH Aachen University, Aachen, Germany


### References


[6] Balaguer IJ, Lei Q, Yang S, Supatti U. Control for grid-connected and intentional islanding operations of distributed power generation. IEEE Transactions on Industrial Electronics. 2011;58(1):47–157

inverter control layer in such a way that the closed loop dynamics of the inverter together with the LC filter present unitary gain. Thus, the current/voltage disturbances associated with the mode transition are fully cancelled. The proposed voltage control algorithm and the conventional double-loop voltage controller are compared with analytical study and experimental implementation. The output (harmonic) impedance is the cause of the tracking error and distortion caused by the output current. With the proposed voltage controller, the output impedance is 'zero' which theoretically eliminates the tracking error and reduces/eliminates the distortion (can only reduce the distortion in the practical implementation due to the measurement noise, digital quantization errors, etc.). The work has shown that the developed voltage control algorithm has superior control performance than the conventional controller, and it is a high-performance controller, easy to be implemented in the practical application.

1 Institute for Automation of Complex Power System, E. ON ERC, RWTH Aachen University,

[1] Chowdhury S, Chowdhury SP, Crossley P. Microgrids and Active Distribution Network.

[2] Zhong QC, Hornik T. Control of Power Inverters in Renewable Energy and Smart Grid

[3] Rocabert J, Luna A, Blaabjerg F. Control of power converters in AC microgrids. IEEE

[4] Mohamed YAR. New control algorithms for the distributed generation interface in gridconnected and microgrid system [dissertation]. Ontario: University of Waterloo; 2008 [5] Wang J, Chang NP, Feng X, Monti A. Design of a generalized control algorithm for parallel inverters for smooth microgrid transition operation. IEEE Transactions on Indus-

Author details

102 Development and Integration of Microgrids

Aachen, Germany

References

Jing Wang1,2\* and Bouna Mohamed Cisse3

3 GE Digital Energy, Philadelphia, USA

Integration. Chichester: Wiley-IEEE; 2013

trial Electronics. 2015;62(8):4900–4914

Transactions on Power Electronics. 2012;27(11):4734–4749

Stevenage: IET; 2009

\*Address all correspondence to: jingwang1108@gmail.com

2 GE Energy Connections—Grid Solutions, Stafford, United Kingdom


Provisional chapter

### **Design and Operation of an Islanded Microgrid at Constant Frequency** Design and Operation of an Islanded Microgrid at Constant Frequency

DOI: 10.5772/intechopen.69401

Daming Zhang and John Fletcher Daming Zhang and John Fletcher

Additional information is available at the end of the chapter Additional information is available at the end of the chapter

http://dx.doi.org/10.5772/intechopen.69401

#### Abstract

This chapter presents a method for operating an islanded microgrid at a constant frequency. The proposed method uses de-coupled PQ control plus real power reference generation based on voltage variation to control the grid-forming generator and gridsupporting generators. Its effectiveness has been validated by a three-phase microgrid system where there is one grid-forming generator, one grid-supporting, and one gridfeeding generator. The grid-forming generator produces its own voltage reference with a constant frequency of 50 Hz, while the grid-supporting and grid-feeding generators take the voltage as a reference at their respective coupling point with the microgrid. It is found that the grid-forming and grid-supporting generators work collaboratively to keep voltages at each bus around the rated value. For a practical microgrid, it is necessary to determine the location and sizing of each grid-supporting generator in order to keep the voltage profile within specification under all operating conditions. To achieve these two purposes and also to reduce the computational demand of modeling and to shorten simulation time, a single-phase equivalent microgrid has been adopted in this research. Such approach is useful for the design of a practical microgrid.

Keywords: constant frequency, grid-forming, grid-feeding, grid-supporting, microgrid, reactive power compensator

### 1. Introduction

An islanded microgrid is normally composed of three groups of distributed generators (DGs), one being grid-forming, the other being grid-supporting and the grid-feeding DGs [1]. To avoid loss of synchronism, normally only one grid-forming DG is adopted in an islanded microgrid. But there could be as many grid-supporting DGs as necessary. Either conventional power sources such as hydropower plants or renewable energy sources like wind or photovoltaic can be used to power grid-feeding generators.

© 2017 The Author(s). Licensee InTech. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

© The Author(s). Licensee InTech. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and eproduction in any medium, provided the original work is properly cited.

In recent decades, intensive research has been conducted on the operation of islanded microgrids, but it is yet to standardize their control methods.

Frequency and voltage droop are normally adopted [1–4]. Such conventional droop control methods have several disadvantages, including (1) ignoring load dynamics that can result in failure subsequent to a large or fast load change; (2) inability to narrow down frequency within certain limit independent of system loading conditions [4–8].

To overcome the drawbacks of the droop control method, a constant frequency method has been applied to operate both three-phase and single-phase microgrids and is described in this chapter.

In the case of the three-phase system, the microgrid is composed of one grid-forming DG, one grid-supporting generator and one grid-feeding DG. The grid-feeding DG is powered by a time-varying solar source. Both the grid-forming DG and grid-supporting DG are powered by fuel cell energy to manage power balance due to load dynamics and solar power variation (PV). The grid-feeding DG adopts PQ control with the capability of maximum power point tracking. The grid-forming DG produces the reference voltage by itself with a constant frequency of 50 Hz and outputs real power according to the system demand after islanding occurs. The grid-supporting DG adopts its terminal voltage as a reference and uses its terminal voltage variation to generate its real power reference while reactive power is set at either zero or a lower value. The system always operates at constant frequency 50 Hz.

The grid-forming DG acts as reactive power sensor as well, which indicates system reactive power demand change due to switch-on or switch-off of loads absorbing reactive power. Once its output reactive power exceeds its set limit, the accompanying instantaneous var compensator takes over the extra reactive power. By doing so, the grid-forming DG's output real power can follow its reference accurately and is adaptive to meet varying load demand. A multiplying factor can be adopted to ensure fast response as described in [9].

As three-phase modeling needs to use a lot of computer memory and results in long simulation times for a practical microgrid, a single-phase model of the microgrid has been developed to identify the locations of each necessary grid-supporting generator and size its necessary capacity to keep the voltage profile at each bus of the microgrid within limits.

This chapter is organized as follows: in Section 2, the overall system is introduced; Section 3 presents the terminal properties of the fuel cell and solar panel. It also presents the control method for extracting maximum power from the solar panel; Section 4 shows results and discussion for the three-phase microgrid under study; in Section 5, the results for the singlephase microgrid are presented and discussed. Section 6 concludes this chapter.

### 2. Overall system

### 2.1. System description

Figure 1 shows the three-phase microgrid under study, where DG1 acts as the grid-forming generator and is powered by fuel cell energy, DG2 acts as a grid-supporting generator and is also powered by fuel cell energy, and DG3 acts as the grid-feeding generator and is powered by solar energy. In practice, in view of the slow response of the fuel cell, at the DC-link of DG1 and DG2, extra circuits such as DC/DC converter interfaced super capacitors can be adopted to ride through transient power demands.

The power rating of each DG is 40 kW in the microgrid system as shown in Figure 1 and their voltage ratings are 415 V (LL).

$$G\_{ol}(\mathbf{s}) = \frac{G\_{\rm c}(\mathbf{s}) \cdot \mathbf{K}}{(L\_1 \mathbf{S} + \mathbf{R}\_1) \cdot (L\_2 \mathbf{s} + \mathbf{R}\_2) \cdot \mathbf{C} \mathbf{s} + \mathbf{K} \cdot \mathbf{C} \mathbf{s} \cdot (L\_2 \mathbf{s} + \mathbf{R}\_2) + (L\_1 \mathbf{S} + \mathbf{R}\_1) + (L\_2 \mathbf{s} + \mathbf{R}\_2)} \tag{1}$$

In each DG, the fundamental converters are the same: DC/DC converter + DC/AC inverter with LCL filter (Figures 2–5). Figures 2 and 3 show such converters for fuel cell and solar energy conversion. Figures 4 and 5 show their control flow and AC side reference current generation.

The open-loop transfer function of the DC/AC inverter with LCL filter is given by Eq. (1). The Laplace description of the proportional resonant controller is given by Eq. (2) and the closedloop transfer function is given by Eq. (3).

$$\mathbf{G}\_c(\mathbf{s}) = \mathbf{K}\_p + \frac{\mathbf{K}\_i \mathbf{s}}{\mathbf{s}^2 + a\_0^2} \tag{2}$$

$$G\_{cl}(\mathbf{s}) = \frac{G\_{ol}(\mathbf{s})}{\mathbf{1} + G\_{ol}(\mathbf{s})} \tag{3}$$

Figure 1. Overall microgrid system.

In recent decades, intensive research has been conducted on the operation of islanded microgrids,

Frequency and voltage droop are normally adopted [1–4]. Such conventional droop control methods have several disadvantages, including (1) ignoring load dynamics that can result in failure subsequent to a large or fast load change; (2) inability to narrow down frequency within

To overcome the drawbacks of the droop control method, a constant frequency method has been applied to operate both three-phase and single-phase microgrids and is described in this chapter. In the case of the three-phase system, the microgrid is composed of one grid-forming DG, one grid-supporting generator and one grid-feeding DG. The grid-feeding DG is powered by a time-varying solar source. Both the grid-forming DG and grid-supporting DG are powered by fuel cell energy to manage power balance due to load dynamics and solar power variation (PV). The grid-feeding DG adopts PQ control with the capability of maximum power point tracking. The grid-forming DG produces the reference voltage by itself with a constant frequency of 50 Hz and outputs real power according to the system demand after islanding occurs. The grid-supporting DG adopts its terminal voltage as a reference and uses its terminal voltage variation to generate its real power reference while reactive power is set at either zero or a

The grid-forming DG acts as reactive power sensor as well, which indicates system reactive power demand change due to switch-on or switch-off of loads absorbing reactive power. Once its output reactive power exceeds its set limit, the accompanying instantaneous var compensator takes over the extra reactive power. By doing so, the grid-forming DG's output real power can follow its reference accurately and is adaptive to meet varying load demand. A multiplying

As three-phase modeling needs to use a lot of computer memory and results in long simulation times for a practical microgrid, a single-phase model of the microgrid has been developed to identify the locations of each necessary grid-supporting generator and size its necessary

This chapter is organized as follows: in Section 2, the overall system is introduced; Section 3 presents the terminal properties of the fuel cell and solar panel. It also presents the control method for extracting maximum power from the solar panel; Section 4 shows results and discussion for the three-phase microgrid under study; in Section 5, the results for the single-

Figure 1 shows the three-phase microgrid under study, where DG1 acts as the grid-forming generator and is powered by fuel cell energy, DG2 acts as a grid-supporting generator and is also powered by fuel cell energy, and DG3 acts as the grid-feeding generator and is powered

but it is yet to standardize their control methods.

106 Development and Integration of Microgrids

certain limit independent of system loading conditions [4–8].

lower value. The system always operates at constant frequency 50 Hz.

factor can be adopted to ensure fast response as described in [9].

2. Overall system

2.1. System description

capacity to keep the voltage profile at each bus of the microgrid within limits.

phase microgrid are presented and discussed. Section 6 concludes this chapter.

Figure 2. Fuel cell power conversion unit.

Figure 3. PV panel coupled to a dc-dc boost converter and grid feeding inverter.

Figure 4. Control flow for the VSI with LCL filter.

Figure 5. Generation of reference currents for the given grid voltage and real and reactive power references.

#### 2.2. Parameter design for grid-tied inverter

The stability of each DG plays a vital role in the overall system operation. The inverter in each DG needs to be well designed to facilitate this purpose.

The method adopted in Ref. [5] allows one to choose appropriate L1, L2, and C parameters. It can also allow one to select appropriate Kp, Ki, and K parameters. Furthermore, the parameters determined can automatically avoid resonance. To facilitate such optimization, a one-phase circuit model with virtual resistance that consumes the rated power at rated voltage is adopted as shown in Figure 6.

The resonant frequency of the LCL circuit is given by the following expression

$$f\_{\rm res} = \frac{1}{2\pi} \sqrt{\frac{L\_1 + L\_2}{L\_1 L\_2 \mathcal{C}}} \tag{4}$$

For good damping of switching frequency harmonic components, the resonant frequency needs to be carefully chosen. Normally it is set below the switching frequency divided by a factor of 1.5–2 and 10 times greater than the fundamental frequency, 50 Hz [5, 11, 14].

Furthermore, a combination of partial direct-pole-placement and differential evolution algorithm is used to determine the basic parameters of the proportional resonant controller for the inverter as described in Ref. [5].

Below are the designed parameters:

Figure 2. Fuel cell power conversion unit.

108 Development and Integration of Microgrids

Figure 4. Control flow for the VSI with LCL filter.

Figure 3. PV panel coupled to a dc-dc boost converter and grid feeding inverter.

Figure 5. Generation of reference currents for the given grid voltage and real and reactive power references.

L<sup>1</sup> = 6.55 mH, L<sup>2</sup> = 0.295 mH, C = 34.4 μF, K<sup>p</sup> = 2.278, K<sup>i</sup> = 28.34, K = 4 2.9, fsampling = 100 kHz, fsw = 5 kHz

The designed zeros and poles of the closed-loop transfer function are shown in Figure 7, from which one can see the poles closest to imaginary axis have a real part close to the target �50. One can also see that two zeros almost overlap with two of the five poles. Hence the optimization follows control theory that the lower the order of the closed-loop transfer function, the less susceptible the system is to noise.

Figures 8 and 9 show the open-loop and closed-loop transfer functions, from which one can see that at the resonant frequency fres = 1.616 kHz, the attenuation is more than 10 dB in the closed loop system. Hence resonance is avoided.

In summary, by choosing appropriate real parts for the two poles of the closed-loop transfer function closest to imaginary axis and ensuring that they are far enough apart from the

Figure 6. One-phase equivalent circuit used to choose proper LCL to contain harmonics.

Figure 7. Designed zeros and poles of closed-loop transfer function using differential evolution optimization.

imaginary axis, resonance at the frequency range of interest can be avoided. Then either passive or active dampening as adopted in Refs. [12–14] is not necessary.

More information on DC/AC inverter design can be found in Ref. [5].

#### 2.3. Overall control strategy

Before islanding occurs, Breaker 2 at the point of common coupling (PCC) in Figure 1 is closed and the three DGs run in PQ control mode. As the grid voltage is almost constant, each DG can

Figure 8. Bode plot of open-loop transfer function using Eq. (1).

Figure 9. Bode plot of closed-loop transfer function using Eq. (3).

imaginary axis, resonance at the frequency range of interest can be avoided. Then either

Figure 7. Designed zeros and poles of closed-loop transfer function using differential evolution optimization.

Before islanding occurs, Breaker 2 at the point of common coupling (PCC) in Figure 1 is closed and the three DGs run in PQ control mode. As the grid voltage is almost constant, each DG can

passive or active dampening as adopted in Refs. [12–14] is not necessary.

More information on DC/AC inverter design can be found in Ref. [5].

2.3. Overall control strategy

110 Development and Integration of Microgrids

Figure 8. Bode plot of open-loop transfer function using Eq. (1).

produce real and reactive power the same as their settings. After islanding occurs at 3.02 s, DG1 operates as a grid-forming generator. DG2 works as a grid-supporting generator, while DG3 works as the grid-feeding generator.

Totally there are five loads whose information is shown in Table 1. Loads 1, 2, and 3 local to each DG are always connected in the system while loads 4 and 5 are switched on and switched off to test whether the designed system can tolerate the disturbance due to such a dynamic change of loads.

The control method after islanding occurs is of paramount importance for the operation of the microgrid. After islanding occurs, the voltages in the microgrid are uncertain. Sustaining a stable voltage, both in terms of magnitude and frequency for the system becomes the main control target. In this research, the grid-forming DG1 takes de-coupled PQ control with selfgenerated voltage reference. Figures 10 and 11 illustrate the method of generating reference real and reactive power for DG1 after islanding happens. A PLL method shown in Figure 10 is adopted to obtain the magnitude and angle of both voltage and current at point P1 in Figure 1. Then such information is utilized to generate an error signal which is fed to a P1 controller and low-pass filter to generate reference real and reactive power as shown in Figure 11. In addition, a multiplying factor F2 is introduced to adjust the reference real power in Figure 11. More description can be found in [9, 16] on how to choose proper factor F1 and the influence of F2 on the performance of the control.

To generate i <sup>2</sup>abc reference by the method shown in Figure 12, both reference power and the reference voltage are required. Instead of taking conventional voltage and frequency droop control to generate the reference, constant magnitudes of voltage and frequency are taken for the grid-forming generator. As the microgrid works at a constant frequency, there is no possibility of maloperation by frequency protection systems. The formulae to generate angular frequency and voltage are given by Eqs. (5) and (6). With the generated reference power, frequency and voltage, the reference current is obtained by the method shown in Figure 12 to control DG1.

The method in Figure 11 is also taken to generate a real power reference for the grid-supporting generators. Then the method shown in Figure 5 is taken to produce reference currents, where vg(t) is the voltage at each coupling point with the microgrid. For the accurate control of real power, the reactive power reference for the grid-supporting generators can be set at a very small value.


Table 1. Load information.

Figure 10. PLL to extract magnitude and angle.

Figure 11. Generation of reference power.

Figure 12. Generation of reference current i <sup>2</sup>abc after islanding occurs.

$$
\omega = \omega\_0 \tag{5}
$$

$$E = E\_0 \tag{6}$$

#### 3. Terminal properties of the fuel cell, solar panel, and wind generator

frequency and voltage, the reference current is obtained by the method shown in Figure 12 to

The method in Figure 11 is also taken to generate a real power reference for the grid-supporting generators. Then the method shown in Figure 5 is taken to produce reference currents, where vg(t) is the voltage at each coupling point with the microgrid. For the accurate control of real power, the reactive power reference for the grid-supporting generators can be set at a very small

Load 1 (PQ) 2 (PQ) 3 (PQ) 4 (RL) 5 (PQ) P (kW) 20 20 20 15 10 Q (kvar) 10 0 0 10 0

> Off: 6.02 s In: 7.02 s

Initial: Off In: 4.02 s Off: 5.02 s

Connection On On On Initial: On

control DG1.

112 Development and Integration of Microgrids

Table 1. Load information.

Figure 10. PLL to extract magnitude and angle.

Figure 11. Generation of reference power.

Figure 12. Generation of reference current i

<sup>2</sup>abc after islanding occurs.

value.

The updated fuel cell model in Matlab/Simulink has been validated by experiment [15]. So, it is an effective model to use for microgrid system level research. The adopted fuel cells have a power rating of 32 kW each. Their other parameters are the same as those in Ref. [9].

To examine the terminal properties of the fuel cell, a Matlab/Simulink circuit shown in Figure 13 is adopted. A controlled current source (CCS) is used to control the output current of the fuel cell. At each level of fuel flow rate, the control signal to the CCS linearly increases with time to above a value which could produce maximum power extraction from the fuel cell.

By changing the fuel flow rate, one can obtain the terminal properties shown in Figure 14, where curves of terminal current, voltage, and power against fuel flow rate are shown.

The fuel cell model is used to power DG1 which works as a grid-forming generator and to power DG2, which works as the grid-supporting generator. No matter whether it is a gridforming or grid-supporting generator, its reference power should be adaptive to dynamic load changes and the variation of solar power injected by DG3. Hence, the terminal properties of current, voltage, and fuel flow rate against power are neccessary for fulfilling real power management by DG1 and DG2. So, curves of terminal current, voltage, and fuel flow rate against output power have been obtained from the model as shown in Figures 13 and 15. With these curves, one may use a polynomial approximation to fit these curves and create a set of coefficients in each of the formulae as shown in Eqs. (7)–(9), where order 3 is adopted.

$$V(P) = A\_0 + A\_1P + A\_2P^2 + A\_3P^3 \tag{7}$$

$$I(P) = B\_0 + B\_1 P + B\_2 P^2 + B\_3 P^3 \tag{8}$$

$$\text{fuel flow rate} (P) = \mathbb{C}\_0 + \mathbb{C}\_1 P + \mathbb{C}\_2 P^2 + \mathbb{C}\_3 P^3 \tag{9}$$

The control for the DC/DC converter and fuel cell in Figure 2 is shown in Figure 16. It is found that control of voltage across capacitor C1 is more suitable for this kind of application. For a demanded real power from a DG, Eq. (9) is used to produce fuel flow rate. Eq. (7) is used to produce the reference voltage across C1. Then the difference between the reference and measured voltage is PI-compensated and compared with a sawtooth to generate a pulse-width modulation (PWM) gating signal. As the curve in Figure 15 has maximum power point tracking feature, for each controlled fuel flow rate, the system can operate at its maximum power output from the fuel cell.

The terminal properties of the solar panel can be found by using the method as shown in Ref. [10]. For the solar panel chosen, its terminal properties are shown in Figure 17.

Figure 13. Circuit for studying termimal properties of the fuel cell.

Figure 14. Terminal current, voltage and power against fuel flow rate.

Figure 15. Terminal current, voltage, fuel flow rate against power.

Figure 16. Controller for fuel cell and DC/DC boost converter.

Figure 13. Circuit for studying termimal properties of the fuel cell.

114 Development and Integration of Microgrids

Figure 14. Terminal current, voltage and power against fuel flow rate.

Figure 15. Terminal current, voltage, fuel flow rate against power.

Figure 17. Operating points at different solar irradiance level (W/m2 ) with MPPT.

To extract maximum power from the solar panel, one may regulate the voltage across capacitor C1 or current flowing through inductor L in Figure 3 or use a two-loop controller to regulate both voltage and current to have better noise rejection capability.

### 4. Results and discussion for the three-phase microgrid

For the operation of the islanded three-phase microgrid, DG1 powered by the first set of fuel cells acts as a grid-forming generator while DG2 powered by another set of fuel cells acts as a grid-supporting generator, and DG3 powered by solar panels acts as the grid-feeding generator.

Figure 18 shows the percentage error of voltage at P1, P2, and P3, from which one can see that percentage error of each voltage under steady state is almost zero and each voltage is maintained almost at rated voltage after islanding occurs. This is especially true for the

Figure 18. Percentage error of voltages at P1, P2, and P3.

voltages at P1 and P2 in Figure 1 because DG1 operates as the grid-forming generator and DG2 acts as grid-supporting generator, both of which produce reference power based on the variation of their respective terminal voltages from the nominal value. As one may use gridsupporting generators as many as necessary, it is foreseeable that with the sufficient number of the grid-supporting generators installed at proper locations in the microgrid, they can work collaboratively with the grid-forming generator to keep the voltage profile within an acceptable limit. Also, the frequency of the system is kept constant at 50 Hz and power quality is ensured.

Figures 19–22 show the power from DG1, DG2, DG3, and the instantaneous var compensator. DG1 and DG2 can cooperate to produce enough power to balance load demand and dynamic changes in the solar power without communication links.

As DG2 is a grid-supporting generator with its reference voltage taken from P2 and operates under PQ control, its reference real power has the flexibility of varying either with the voltage at P2 (as adopted for this modeling) or it can be produced from a range with particular lower limit and upper limit. One can even fix it at a value when the variation of load demand and renewable energy generation does not change too much. Different from conventional droop control which demands the change of set point with system operating condition, the proposed method just demands that each grid-forming and grid-supporting DG outputs real power as they can within their limit. Each grid-supporting DG can switch from flexible operating mode which outputs real power according to its terminal voltage variation to fixed real power generation mode [16].

Figures 23 and 24 show the factor F2, pre-tuned reference real power and reference real power, which is equal to pre-tuned reference real power multiplied by F2, for DG1 and DG2. From

Figure 19. Power from DG1.

voltages at P1 and P2 in Figure 1 because DG1 operates as the grid-forming generator and DG2 acts as grid-supporting generator, both of which produce reference power based on the variation of their respective terminal voltages from the nominal value. As one may use gridsupporting generators as many as necessary, it is foreseeable that with the sufficient number of the grid-supporting generators installed at proper locations in the microgrid, they can work collaboratively with the grid-forming generator to keep the voltage profile within an acceptable limit. Also, the frequency of the system is kept constant at 50 Hz and power quality is

Figures 19–22 show the power from DG1, DG2, DG3, and the instantaneous var compensator. DG1 and DG2 can cooperate to produce enough power to balance load demand and dynamic

As DG2 is a grid-supporting generator with its reference voltage taken from P2 and operates under PQ control, its reference real power has the flexibility of varying either with the voltage at P2 (as adopted for this modeling) or it can be produced from a range with particular lower limit and upper limit. One can even fix it at a value when the variation of load demand and renewable energy generation does not change too much. Different from conventional droop control which demands the change of set point with system operating condition, the proposed method just demands that each grid-forming and grid-supporting DG outputs real power as they can within their limit. Each grid-supporting DG can switch from flexible operating mode which outputs real power according to its terminal voltage variation to fixed real power

Figures 23 and 24 show the factor F2, pre-tuned reference real power and reference real power, which is equal to pre-tuned reference real power multiplied by F2, for DG1 and DG2. From

changes in the solar power without communication links.

Figure 18. Percentage error of voltages at P1, P2, and P3.

116 Development and Integration of Microgrids

ensured.

generation mode [16].

Figure 20. Power from DG2.

Figure 21. Power from DG3.

Figure 22. Power from instantaneous var compensator.

Figure 23. Factor F2, PIM, and Pref in Figure 11(b) for DG1.

Figure 21. Power from DG3.

118 Development and Integration of Microgrids

Figure 22. Power from instantaneous var compensator.

Figure 24. Factor F2, PIM and Pref in Figure 11(b) for DG2.

these two figures, one can see that introduction of F2 can quickly produce the appropriate real power reference, which helps stabilize the system voltage when there is a sudden change of load demand or renewable energy generation.

Figures 25–30 show the results of DC/DC converter for each of DG1, DG2, and DG3. From Figures 26, 28, and 30, one can see that the voltage across C1 can trace its respective reference accurately. For DG1 and DG2, such accurate tracing ensures that for a given fuel flow rate, the maximum power is output at the terminal of fuel cell and fuel wastage is avoided. To generate

Figure 25. Current flowing through diode and voltage across C2 in the DC/DC converter for DG1.

Figure 26. Fuel flow, voltage across C1, and reference power for DG1.

such reference fuel flow rate dynamically, one needs to use the curves in Figure 15 or formula shown in Eq. (9) for a demanded reference real power. Figures 27 and 29 show the diode current and voltage across capacitor C2 in the circuits as shown in Figures 2 and 3.

Figures 25–30 show the results of DC/DC converter for each of DG1, DG2, and DG3. From Figures 26, 28, and 30, one can see that the voltage across C1 can trace its respective reference accurately. For DG1 and DG2, such accurate tracing ensures that for a given fuel flow rate, the maximum power is output at the terminal of fuel cell and fuel wastage is avoided. To generate

120 Development and Integration of Microgrids

Figure 25. Current flowing through diode and voltage across C2 in the DC/DC converter for DG1.

Figure 26. Fuel flow, voltage across C1, and reference power for DG1.

Figure 27. Current flowing through diode and voltage across C2 in the DC/DC converter for DG2.

Figure 28. Fuel flow, voltage across C1, and reference power for DG2.

Figure 29. Current flowing through diode and voltage across C2 in the DC/DC converter for DG3.

Figure 30. Voltage across C1 and irradiance level in Figure 4 of DG3 for solar energy harnessing.

### 5. Power sharing among distributed grid-supporting generators using the single-phase model

In this section, the grid-forming generator produces a voltage reference with constant frequency for the system, and both grid-supporting and grid-feeding generators take their respective terminal voltages as a reference. Hence, the overall system operates at a constant frequency.

Then the main design target for such method is to keep voltage profile at each bus within the limits.

Time-stepped discrete code-based modeling of the three-phase power system in Matlab/ Simulink is closer to its real hardware implementation. Nevertheless, it is time-consuming and takes a lot of computing resources for a practical, large microgrid system. Hence, a new approach needs are developed to solve this problem. From the point of view of designing a microgrid system, it is important to identify a suitable location for each grid-supporting generator and size each of them in order to keep the overall voltage profile of the microgrid within an acceptable limit under all conditions of possible loading and renewable generation conditions. To suit such purposes, a microgrid formed by three-phase components could be reduced to a microgrid formed by a single-phase power system. This is because within the concern of the current study, the microgrid is composed of only microgrid-tied inverter-based generators and storage and does not contain directly connected conventional synchronous generators. When a three-phase system is reduced to a single-phase system, the number of differential equations describing the system is reduced to one-third. For example, modeling the LCL filter used with a voltage source inverter could be reduced to one-third as only one-phase LCL filter instead of three phases needs be modeled.

Figure 31 shows a single-phase microgrid. This is for studying the power sharing among distributed grid-supporting generators. It can also be adopted to identify the locations of

Figure 31. A single-phase microgrid system.

5. Power sharing among distributed grid-supporting generators using the

Figure 30. Voltage across C1 and irradiance level in Figure 4 of DG3 for solar energy harnessing.

Figure 29. Current flowing through diode and voltage across C2 in the DC/DC converter for DG3.

In this section, the grid-forming generator produces a voltage reference with constant frequency for the system, and both grid-supporting and grid-feeding generators take their respective terminal voltages as a reference. Hence, the overall system operates at a constant frequency.

single-phase model

122 Development and Integration of Microgrids


Table 2. Load information for single-phase microgrid.

distributed grid-supporting generators and size their capacity in order to keep the voltage profile at each bus within limits.

The information on loads in the single-phase microgrid is shown in Table 2. Initially, this microgrid is connected with a single-phase source at the point of common coupling (PCC). At 2.5 s, the source is disconnected. From then on, the microgrid operates in islanded mode.

There are two cases studied for the single-phase microgrid. In the first case, DG1 acts as a gridforming generator, while DG2 and DG4 act as grid-supporting generators, and DG3 powered by solar power variation (PV) acts as grid-feeding generator which extracts maximum power from the solar resource. In the second case, DG1 still acts as grid-forming generator, DG3 still powered by solar panel acts as grid-feeding generator which extracts maximum power from solar panel, only DG2 acts as a grid-supporting generator, while DG4 is to simulate a planned battery charging/discharging according to predicted irradiance levels.

### 6. Results for the first case

The results for Case 1 are shown in Figures 32–37. Figures 32–36 show the real and reactive power output from DG1 through DG4 and also from the reactive power compensator. After islanding occurs, each of the grid-forming and grid-supporting generators works collaboratively to ensure the voltage at each bus in the microgrid as close as possible to the rated value (240 Vrms). Stabilizing on a new equilibrium after switching-in or switching-off of loads takes different durations for different transients. Nevertheless, voltages at each bus can quickly settle down around the rated value after each switching. This can be seen from Figure 37, from which one can see that the voltage deviation from its rated value is within 5% most of the time. It only deviates out of this range in a very short while when the load 3 with a significant amount of reactive power is switched in. The variation of solar energy does not influence the voltage at each bus as its change is relatively slow.

The reactive power compensator as installed at point P5 in Figure 31 compensates reactive power demanded in the direction of current Icp as shown in the figure. At the instant 4.5 s, when load 3 with 15 Kvar reactive power is switched in, the reactive power compensator quickly increases its reactive power output to meet this demand as shown in Figure 36. From 5 s, when load 3 is switched off, the reactive power output from the compensator reduces quickly as less reactive power is demanded in the compensation direction.

Figure 32. Real and reactive power output from DG1 in Figure 31 for the first case.

distributed grid-supporting generators and size their capacity in order to keep the voltage

Load 1 (PQ) 2 (PQ) 3 (PQ) 4 (RL) P (kW) 30 10 10 10 Q (kvar) 0 7.5 15 10

> On: 3.5 s Off: 4.0 s

Initial: off On: 4.5 s Off: 5.0 s

Initial: off On: 5.5 s Off: –

The information on loads in the single-phase microgrid is shown in Table 2. Initially, this microgrid is connected with a single-phase source at the point of common coupling (PCC). At 2.5 s, the source is disconnected. From then on, the microgrid operates in islanded mode.

There are two cases studied for the single-phase microgrid. In the first case, DG1 acts as a gridforming generator, while DG2 and DG4 act as grid-supporting generators, and DG3 powered by solar power variation (PV) acts as grid-feeding generator which extracts maximum power from the solar resource. In the second case, DG1 still acts as grid-forming generator, DG3 still powered by solar panel acts as grid-feeding generator which extracts maximum power from solar panel, only DG2 acts as a grid-supporting generator, while DG4 is to simulate a planned

The results for Case 1 are shown in Figures 32–37. Figures 32–36 show the real and reactive power output from DG1 through DG4 and also from the reactive power compensator. After islanding occurs, each of the grid-forming and grid-supporting generators works collaboratively to ensure the voltage at each bus in the microgrid as close as possible to the rated value (240 Vrms). Stabilizing on a new equilibrium after switching-in or switching-off of loads takes different durations for different transients. Nevertheless, voltages at each bus can quickly settle down around the rated value after each switching. This can be seen from Figure 37, from which one can see that the voltage deviation from its rated value is within 5% most of the time. It only deviates out of this range in a very short while when the load 3 with a significant amount of reactive power is switched in. The variation of solar energy does not influence the

The reactive power compensator as installed at point P5 in Figure 31 compensates reactive power demanded in the direction of current Icp as shown in the figure. At the instant 4.5 s, when load 3 with 15 Kvar reactive power is switched in, the reactive power compensator quickly increases its reactive power output to meet this demand as shown in Figure 36. From 5 s, when load 3 is switched off, the reactive power output from the compensator reduces

quickly as less reactive power is demanded in the compensation direction.

battery charging/discharging according to predicted irradiance levels.

profile at each bus within limits.

124 Development and Integration of Microgrids

Connection On Initial: off

Table 2. Load information for single-phase microgrid.

6. Results for the first case

voltage at each bus as its change is relatively slow.

Figure 33. Real and reactive power output from DG2 in Figure 31 for the first case.

As the dynamic load changes and the change of renewable energy generation happens at the coupling points P2, P3, and P4 in Figure 31, the real power output of the grid-forming generator does not vary much after reaching a stable point. Nevertheless, the two gridsupporting generators DG2 and DG4 change their output real power dynamically to stabilize the voltage at each bus around rated values when the loads and renewable energy generation change.

Figure 34. Real and reactive power output from DG3 in Figure 31 for the first case.

Figure 35. Real and reactive power output from DG4 in Figure 31 for the first case.

Figure 36. Real and reactive power output from the reactive power compensator in Figure 31 for the first case.

Figure 37. Deviation of voltage at P1–P4 from the rated value for the first case.

Figure 35. Real and reactive power output from DG4 in Figure 31 for the first case.

Figure 34. Real and reactive power output from DG3 in Figure 31 for the first case.

126 Development and Integration of Microgrids

At 4.0 s, load 2 that is connected at P2, local to DG2, is turned off. After this moment, DG2 continues to output a certain amount of real power working with the second grid-supporting generator DG4 to stabilize the voltage at each bus close to the rated value. In the following transients, either due to the switch-on and switch-off of loads or due to the change of renewable energy generation, DG2 and DG4 work with DG1 collaboratively to keep the voltage profiles at each bus within acceptable limits 5%, as shown in Figure 37.

### 7. Results for the second case

The results for Case 2 are shown in Figures 38–44. Figures 39–44 show the real and reactive power output from DG1 through DG4 and also from the reactive power compensator. After islanding occurs at 2.5 s, the grid-forming and grid-supporting generators work collaboratively to ensure the voltage at each bus in the microgrid as close as possible to their rated value. For this case, only DG2 serves as the grid-supporting generator. DG4 acts as a planned battery charger and discharger. The charging and discharging power pattern as shown in the lower waveform in Figure 38 is determined by the predicted irradiance pattern as shown in the top waveform in Figure 38. Compared with the first case, the grid-forming generator DG1 more actively participates in the real power generation as there is only one grid-supporting generator DG2, though it is located quite far away from points P3 and P4. Due to the collaborative

Figure 38. Variation of irradiance and planned charging and discharging for DG4: positive—discharging; negative charging.

Design and Operation of an Islanded Microgrid at Constant Frequency http://dx.doi.org/10.5772/intechopen.69401 129

Figure 39. Real and reactive power output from DG1 in Figure 31 for the second case.

At 4.0 s, load 2 that is connected at P2, local to DG2, is turned off. After this moment, DG2 continues to output a certain amount of real power working with the second grid-supporting generator DG4 to stabilize the voltage at each bus close to the rated value. In the following transients, either due to the switch-on and switch-off of loads or due to the change of renewable energy generation, DG2 and DG4 work with DG1 collaboratively to keep the voltage

The results for Case 2 are shown in Figures 38–44. Figures 39–44 show the real and reactive power output from DG1 through DG4 and also from the reactive power compensator. After islanding occurs at 2.5 s, the grid-forming and grid-supporting generators work collaboratively to ensure the voltage at each bus in the microgrid as close as possible to their rated value. For this case, only DG2 serves as the grid-supporting generator. DG4 acts as a planned battery charger and discharger. The charging and discharging power pattern as shown in the lower waveform in Figure 38 is determined by the predicted irradiance pattern as shown in the top waveform in Figure 38. Compared with the first case, the grid-forming generator DG1 more actively participates in the real power generation as there is only one grid-supporting generator DG2, though it is located quite far away from points P3 and P4. Due to the collaborative

Figure 38. Variation of irradiance and planned charging and discharging for DG4: positive—discharging; negative—

profiles at each bus within acceptable limits 5%, as shown in Figure 37.

7. Results for the second case

128 Development and Integration of Microgrids

charging.

Figure 40. Real and reactive power output from DG2 in Figure 31 for the second case.

effort of DG1 and DG2, the voltages at points of P1, P2, P3, and P4 are well kept around the rated voltage and their deviation from the rated value is within 5% most time. It only deviates out of this range for a very short duration when load 3 with a significant amount of

Figure 41. Real and reactive power output from DG3 in Figure 31 for the second case.

Figure 42. Real and reactive power output from DG4 in Figure 31 for the second case.

Figure 43. Real and reactive power output from the reactive power compensator in Figure 31 for the second case.

Figure 44. Deviation of voltage at P1–P4 from the rated value for the second case.

Figure 41. Real and reactive power output from DG3 in Figure 31 for the second case.

130 Development and Integration of Microgrids

Figure 42. Real and reactive power output from DG4 in Figure 31 for the second case.

reactive power is switched in. The variation of solar energy does not influence the voltage at each bus.

The reactive power compensator as installed at point P5 in Figure 31 again compensates reactive power demanded in the direction of current Icp as shown in the figure. At 4.5 s, when load 3 with 15 Kvar reactive power is switched in, the reactive power compensator quickly increases its reactive power output to meet this demand as shown in Figure 43. From 5 s, when load 3 is switched off, the reactive power output from the compensator reduces quickly as less reactive power is demanded in the direction of compensation.

The planned battery discharging and charging starts at 3.0 s as shown in Figure 38 after the islanding occurs at 2.5 s. During the charging period between 3.4 s and 5.7 s, both DG1 and DG2 output more real power to balance the system compared with the first case. This is naturally true as in the second case, DG4 acts as an equivalent load during the charging mode.

In summary, in the second case, the grid-forming generator DG1, and grid-supporting generator DG2 can work collaboratively to stabilize the voltages at each bus around the rated voltage.

### 8. Conclusion

A method has been presented in this chapter for overcoming the drawback of droop control based operation of islanded microgrids. The method generates a real power reference for the grid-forming generator and grid-supporting generators based on their respective terminal voltage variation. The grid-forming generator takes an extra role of being a reactive power sensor when the line impedance is small. Its reactive power is quickly transferred to and from its accompanying instantaneous var compensator. It is found that so long as the reactive power from such a grid-forming generator is small, its real power output can follow its reference accurately and easily and quickly adapts to changes in real power demand in the system to reach a new equilibrium. The effectiveness of the proposed method has been validated in a three-phase microgrid, which contains one grid-forming generator, one grid-supporting generator, and one renewable energy powered generator. It is found that grid-forming and gridsupporting generators are able to output real power to keep the microgrid in a balanced state when the load and renewable energy generations change. The dynamic balance of power demand and power generation is always achieved, and a voltage at each bus is kept at its rated voltage.

Furthermore, a multiplying factor is taken to reduce the response time of reference power generation. With such a factor, the system does not need to change the settings of real power and reactive power references, or alternatively, the system can operate with the temporary loss of a communication link. One more pronounced feature of the proposed control method is that the system operates at a constant frequency or 50 Hz.

This chapter has further developed a method for designing a practical microgrid system: using a single-phase microgrid to replace three-phase microgrid system. Such an approach can be adopted to achieve two main purposes, one being to identify the location where each necessary grid-supporting generator needs be installed, and the other being to size each of them to ensure the voltage profile at each bus is maintained at the rated value under all possible operating conditions, including sudden load change and sudden change in renewable energy generation.

With a sufficient number of grid-supporting generators distributed in the microgrid, it is foreseeable that the voltage at each bus in the microgrid system can operate close to its rated voltage.

### Author details

The planned battery discharging and charging starts at 3.0 s as shown in Figure 38 after the islanding occurs at 2.5 s. During the charging period between 3.4 s and 5.7 s, both DG1 and DG2 output more real power to balance the system compared with the first case. This is naturally true as in the second case, DG4 acts as an equivalent load during the charging mode. In summary, in the second case, the grid-forming generator DG1, and grid-supporting generator DG2 can work collaboratively to stabilize the voltages at each bus around the rated voltage.

A method has been presented in this chapter for overcoming the drawback of droop control based operation of islanded microgrids. The method generates a real power reference for the grid-forming generator and grid-supporting generators based on their respective terminal voltage variation. The grid-forming generator takes an extra role of being a reactive power sensor when the line impedance is small. Its reactive power is quickly transferred to and from its accompanying instantaneous var compensator. It is found that so long as the reactive power from such a grid-forming generator is small, its real power output can follow its reference accurately and easily and quickly adapts to changes in real power demand in the system to reach a new equilibrium. The effectiveness of the proposed method has been validated in a three-phase microgrid, which contains one grid-forming generator, one grid-supporting generator, and one renewable energy powered generator. It is found that grid-forming and gridsupporting generators are able to output real power to keep the microgrid in a balanced state when the load and renewable energy generations change. The dynamic balance of power demand and power generation is always achieved, and a voltage at each bus is kept at its

Furthermore, a multiplying factor is taken to reduce the response time of reference power generation. With such a factor, the system does not need to change the settings of real power and reactive power references, or alternatively, the system can operate with the temporary loss of a communication link. One more pronounced feature of the proposed control method is that

This chapter has further developed a method for designing a practical microgrid system: using a single-phase microgrid to replace three-phase microgrid system. Such an approach can be adopted to achieve two main purposes, one being to identify the location where each necessary grid-supporting generator needs be installed, and the other being to size each of them to ensure the voltage profile at each bus is maintained at the rated value under all possible operating conditions, including sudden load change and sudden change in renewable energy

With a sufficient number of grid-supporting generators distributed in the microgrid, it is foreseeable that the voltage at each bus in the microgrid system can operate close to its rated

the system operates at a constant frequency or 50 Hz.

8. Conclusion

132 Development and Integration of Microgrids

rated voltage.

generation.

voltage.

Daming Zhang\* and John Fletcher

\*Address all correspondence to: daming.zhang@unsw.edu.au

School of Electrical Engineering and Telecommunication, University of New South Wales, Sydney, Australia

### References

