Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

In this chapter, the control objectives in AC and DC microgrids are discussed separately. This chapter brings together the existing AC and DC microgrid control schemes. Based on the desired control objectives, mathematical models are presented for DGs. These mathematical models are the key elements in designing control schemes for microgrids .

2.1 Control of AC Microgrids

In this section, first the control objectives in AC microgrids are elaborated. Then, based on these control objectives, the hierarchical control structure of AC microgrids is discussed. The hierarchical control structure contains three main levels, namely primary, secondary, and tertiary control levels. Finally, the dynamical model of distributed generators is elaborated. These dynamical models will be used in subsequent chapters to design distributed control protocols for microgrids.

2.1.1 Control Objectives in AC Microgrids

Microgrids can operate in two modes: grid-connected mode and islanded mode. The proper control of microgrid is a prerequisite for stable and economically efficient operation. The principal roles of the microgrid control structure are as follows [1,2,3,4,5,6]:

  • Voltage and frequency regulation for both operating modes,

  • Proper load sharing and DG coordination,

  • Microgrid resynchronization with the main grid,

  • Power flow control between the microgrid and the main grid,

  • Optimizing the microgrid operating cost,

  • Proper handling of transients and restoration of desired conditions when switching between modes.

These requirements are of different significances and timescales, thus requiring a hierarchical control structure to address each requirement at a different control hierarchy level. The microgrid hierarchical control strategy consists of three levels, namely primary, secondary, and tertiary controls , as shown in Fig. 2.1. The primary control operates at the fastest timescale and maintains voltage and frequency stability of the microgrid subsequent to the islanding process when switching from grid-connected mode. It is essential to provide independent active and reactive power sharing controls for the DGs in the presence of both linear and nonlinear loads . Moreover, the power sharing control avoids undesired circulating currents . The primary control level includes fundamental control hardware, commonly referred to as zero level, which comprises internal voltage and current control loops of the DGs. The secondary control compensates for the voltage and frequency deviations caused by the operation of the primary controls and restores frequency and voltage synchronization. At the highest level and slowest timescale, the tertiary control manages the power flow between the microgrid and the main grid and facilitates an economically optimal operation [1, 7].

Fig. 2.1
figure 1

Hierarchical control levels of a microgrid . © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

2.1.2 Primary Control Techniques in AC Microgrids

The primary control is designed to satisfy the following requirements:

  • To stabilize the voltage and frequency : Subsequent to an islanding event, the microgrid may lose its voltage and frequency stability due to the mismatch between the power generated and consumed.

  • To offer plug-and-play capability for DGs and properly share the active and reactive powers among them, preferably, without any communication links.

  • To mitigate circulating currents that can cause overcurrent phenomenon in the power electronic devices and damage the DC-link capacitor.

The primary control provides the reference points for the real-time voltage and current control loops of DGs. These inner control loops are commonly referred to as zero-level control. The zero-level control is generally implemented in either active/reactive power (PQ) mode or voltage control mode [6].

In the PQ control mode, the DG active and reactive power delivery is regulated on the predetermined reference points, as shown in Fig. 2.2. The control strategy is implemented with a current-controlled voltage source inverter (CCVSI). In Fig. 2.2, H 1 controller regulates the DC-link voltage and the active power through adjusting the magnitude of the output active current of the converter, i p . H 2 controller regulates the output reactive power by adjusting the magnitude of the output reactive current, i.e., i q [6].

Fig. 2.2
figure 2

PQ control mode with active and reactive power references. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

In the voltage control mode, the DG operates as a voltage-controlled voltage source inverter (VCVSI) where thereference voltage , \( v_{o}^{*} \), is determined by the primary control, conventionally via droop characteristics [6], as shown in Fig. 2.3. The nested voltage and current control loops in the voltage control mode are shown in Fig. 2.4. This controller feeds the current signal as a feedforward term via a transfer function (e.g., virtualimpedance) [1].

Fig. 2.3
figure 3

Reference voltage determination for voltage control mode. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

Fig. 2.4
figure 4

Voltage and current control loops in voltage control mode. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

Power quality of small-scale islanded systems is of particular importance due to the presence of nonlinear and single-phase loads and the low inertia of the microgrid . To improve the power quality for a set of energy sources connected to a common bus, the control structure shown in Fig. 2.5 is used. In this figure, \( H_{\text{LPF}} (s) \) denotes the transfer function of a low-pass filter. Each converter has an independent current control loop and a central voltage control loop that is adopted to distribute the fundamental component of the active and reactive powers among different sources. The reference point for the voltage control loop is determined by the primary control . The individual current controllers ensure power quality by controlling the harmonic contents of the supplied currents to the common AC bus. The DG’s control modes are usually implemented using the droop characteristic techniques [1, 8].

Fig. 2.5
figure 5

Zero-level control loops for a set of energy sources connected to an AC bus. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

Droop Control. The droop control method has been referred to as independent, autonomous, and wireless control due to the elimination of intercommunication links between the converters. The conventional active power control (frequency droop characteristic ) and reactive power control (voltage droop characteristic ), those illustrated in Fig. 2.6, are used for voltage mode control. Principles of the conventional droop methods can be explained by considering an equivalent circuit of a VCVSI connected to an AC bus, as shown in Fig. 2.7. If switching ripples and high-frequency harmonics are neglected, the VCVSI can be modeled as an AC source, with the voltage of \( E\angle \delta \). In addition, assume that the common AC bus voltage is \( V_{\text{com}} \angle 0 \) and the converter output impedance and the line impedance are lumped as a single effective line impedance of \( Z\angle \theta \). The complex power delivered to the common AC bus is calculated as

Fig. 2.6
figure 6

Conventional droop method. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

Fig. 2.7
figure 7

Simplified diagram of a converter connected to the microgrid . © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

$$ S = V_{\text{com}} I^{*} = \frac{{V_{\text{com}} E\angle \theta - \delta }}{Z} - \frac{{V_{\text{com}}^{2} \angle \theta }}{Z}, $$
(2.1)

from which the real and reactive powers are achieved as

$$ \left\{ {\begin{array}{*{20}l} {P = \frac{{V_{\text{com}} E}}{Z}\cos (\theta - \delta ) - \frac{{V_{\text{com}}^{2} }}{Z}\cos (\theta ),} \hfill \\ {Q = \frac{{V_{\text{com}} E}}{Z}\sin (\theta - \delta ) - \frac{{V_{\text{com}}^{2} }}{Z}\sin (\theta ).} \hfill \\ \end{array} } \right. $$
(2.2)

If the effective line impedance , \( Z\angle \theta \), is assumed to be purely inductive, \( \theta = 90^\circ \), then (2.2) can be reduced to

$$ \left\{ {\begin{array}{*{20}l} {P = \frac{{V_{\text{com}} E}}{Z}\sin \delta ,} \hfill \\ {Q = \frac{{V_{\text{com}} E\,\cos \delta - V_{\text{com}}^{2} }}{Z}.} \hfill \\ \end{array} } \right. $$
(2.3)

If the phase difference between the converter output voltage and the common AC bus, \( \delta \), is small enough, then \( \sin \delta \approx \delta \) and \( \cos \delta \approx 1 \). Thus, one can apply the frequency and voltage droop characteristics to fine-tune the voltage reference of the VCVSI as shown in Fig. 2.6 based on

$$ \left\{ {\begin{array}{*{20}l} {\omega = \omega^{*} - D_{P} P,} \hfill \\ {E = E^{*} - D_{Q} Q,} \hfill \\ \end{array} } \right. $$
(2.4)

where the primary control references \( E^{*} \) and \( \omega^{*} \) are the DG output voltage RMS value and angular frequency at the no-load condition, respectively. The droop coefficients , D P and D Q , can be adjusted either heuristically or by tuning algorithms (e.g., particle swarm optimization [9]). In the former approach, D P and D Q are determined based on the converter power rating and the maximum allowable voltage and frequency deviations. For instance, in a microgrid with N DGs, corresponding D P and D Q should satisfy the following constraints [10, 11]

$$ \left\{ {\begin{array}{*{20}l} {D_{P1} P_{n1} = D_{P2} P_{n2} = \ldots = D_{PN} P_{nN} = \Delta \omega_{\max} ,} \hfill \\ {D_{Q1} Q_{n1} = D_{Q2} Q_{n2} = \ldots = D_{QN} Q_{nN} = \Delta E_{\max} ,} \hfill \\ \end{array} } \right. $$
(2.5)

where \( \Delta \omega_{\hbox{max} } \) and \( \Delta E_{\hbox{max} } \) are the maximum allowable angular frequency and voltage deviations, respectively. P ni and Q ni are the nominal active and reactive powers of the ith DG .

During the grid-tied operation of microgrid , the DG voltage and angular frequency , E and \( \omega \), are enforced by the gird. The DG output active and reactive power references, P ref and Q ref, can hence be adjusted through \( E^{*} \) and \( \omega^{*} \) [6] as

$$ \left\{ {\begin{array}{*{20}l} {P^{\text{ref}} = \frac{{\omega^{*} - \omega }}{{D_{P} }},} \hfill \\ {Q^{\text{ref}} = \frac{{E^{*} - E}}{{D_{Q} }}.} \hfill \\ \end{array} } \right. $$
(2.6)

Dynamic response of the conventional primary control , on the simplified system of Fig. 2.7, can be studied by linearizing (2.3) and (2.4). For instance, the linearized active power equation in (2.3) and frequency droop characteristic in (2.4) are

$$ \left\{ {\begin{array}{*{20}l} {\Delta P = G\Delta \delta ,} \hfill \\ {\Delta \omega = \Delta \omega^{*} - D_{P} \Delta P.} \hfill \\ \end{array} } \right. $$
(2.7)

where at the operating point of V com0, E 0, and \( \delta_{0} \)

$$ G = \frac{{V_{{{\text{com}}0}} E_{0} }}{Z}\cos \delta_{0} , $$
(2.8)

and

$$ \Delta \delta = \int {\Delta \omega dt} . $$
(2.9)

Therefore, the small-signal model for the active power control in (2.4) is

$$ \Delta P(s) = \frac{G}{{s + D_{P} G}}\Delta \omega^{*} (s). $$
(2.10)

A similar procedure can be adopted to extract the small-signal model of the reactive power control .

The block diagram of the small-signal model for the active power control of (2.4) is demonstrated in Fig. 2.8. As shown in (2.10), time constant of the closed-loop control can only be adjusted by tuning D P . On the other hand, as shown in (2.4), D P also affects the DG frequency . Thus, a basic trade-off exists between the time constant of the control system and the frequency regulation.

Fig. 2.8
figure 8

Small-signal model of the conventional active power control . © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

As opposed to the active load sharing technique, the conventional droop method can be implemented with no communication links, and therefore, it is more reliable. However, it has some drawbacks as listed below:

  • Since there is only one control variable for each droop characteristic, e.g., D P for frequency droop characteristic, it is impossible to satisfy more than one control objectives. As an example, a design trade-off needs to be considered between the time constant of the control system and the voltage and frequency regulation [12, 13].

  • The conventional droop method is developed assuming highly inductive effective impedance between the VCVSI and the AC bus. However, this assumption is challenged in microgrid applications since low-voltage transmission lines are mainly resistive. Thus, (2.3) is not valid for microgrid applications [11].

  • As opposed to the frequency, the voltage is not a global quantity in the microgrid. Thus, the reactive power control in (2.4) may adversely affect the voltage regulation for critical loads .

  • In case of nonlinear loads , the conventional droop method is unable to distinguish the load current harmonics from the circulating current . Moreover, the current harmonics distort the DG output voltage . The conventional droop method can be modified to reduce the total harmonic distortion (THD) of the output voltages [14, 15].

These potential drawbacks have been widely discussed in the literature. The proposed solutions are discussed next.

Adjustable Load Sharing Method. In this technique for improving droop control , the time constant of the proposed active and reactive power controllers can be adjusted without causing any impact on the DG voltage and frequency [12, 13]. The proposed active power controller uses the conventional controller in (2.4); however, the phase angle of the VCVSI, \( \delta \), in Fig. 2.7 is determined by

$$ \delta = K_{p} \int {\omega dt} , $$
(2.11)

where K p is an integral gain. Given (2.11), the small-signal model of the proposed controller can be derived as

$$ \Delta P(s) = \frac{{K_{p} G}}{{s + K_{p} D_{P} G}}\Delta \omega^{*} (s), $$
(2.12)

where G is defined in (2.8). The block diagram of this model is illustrated in Fig. 2.9. The eigenvalue of the linearized control system of (2.12) is

Fig. 2.9
figure 9

The small-signal model of the adjustable active power control . © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

$$ \lambda = - K_{p} D_{P} G $$
(2.13)

Equation (2.13) shows this eigenvalue depends on the integral gain, K p , and the droop coefficient , D p . Therefore, the closed-loop time constant can be directly adjusted by tuning K p . Since D p is remained intact, the resulting frequency of the active power control in (2.4) will no longer be affected by the controller time constant adjustment.

Similarly, at the operating point of V com0, E 0, and \( \delta_{0} \), the small-signal control for the reactive power control in (2.4) can be found by perturbing (2.3) and (2.4).

$$ \Delta Q(s) = \frac{H}{{1 + D_{Q} H}}\Delta E^{*} (s), $$
(2.14)

where

$$ H = \frac{{V_{{{\text{com}}0}} \cos \delta_{0} }}{Z}. $$
(2.15)

As shown in (2.14), \( \Delta Q \) is a linear function of a reference signal, \( \Delta E^{*} \). Since H is a function of \( \delta_{0} \), line , and the operating point, performance of the conventional reactive power control in (2.4) tightly depends on the microgrid operational parameters. In the adjustable reactive power sharing method, an integral controller is used that regulates the common bus voltage in Fig. 2.7, V com, to match a reference voltage , V ref [12]

$$ E = K_{q} \int {(V_{\text{ref}} - V_{\text{com}} ){\text{d}}t} , $$
(2.16)

where K q is the integral gain and

$$ V_{\text{ref}} = E^{ * } - D_{Q} {\kern 1pt} Q. $$
(2.17)

In steady state, V com and V ref are equal. Moreover, the steady-state reactive power can be calculated as

$$ Q = \frac{{E^{*} - V_{\text{com}} }}{{D_{Q} }}. $$
(2.18)

Thus, as opposed to (2.14) and (2.15), microgrid operational parameters will no longer affect the reactive power control. Additionally, voltage regulation of the common bus is guaranteed. The small-signal model for the proposed reactive power control is shown in Fig. 2.10 and is expressed by

Fig. 2.10
figure 10

The small-signal model of the adjustable reactive power control . © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

$$ \Delta Q(s) = \frac{{k_{q} H}}{{s + k_{q} D_{Q} H}}\Delta E^{*} (s) - \frac{{k_{q} H}}{{s + k_{q} D_{Q} H}}\Delta V_{\text{com}} (s) $$
(2.19)

The closed-loop transfer function of (2.19) is a function of both k q and D Q . Therefore, the dynamic response of the proposed reactive power control can be directly adjusted by k q . Since D Q is remained intact, the resulting voltage of the reactive power control in (2.4) will no longer be affected by the controller time constant adjustment.

VPD/FQB Droop Method. Low-voltage transmission lines are basically resistive. Thus, one can consider a resistive effective line impedance , i.e., \( \theta = \theta^\circ \), and also can assume the \( \delta \) to be small enough that \( \sin \delta \approx \delta \). Considering these assumptions, (2.2) can be simplified as

$$ \left\{ {\begin{array}{*{20}l} {P \approx \frac{{V_{\text{com}} E - V_{\text{com}}^{2} }}{Z},} \hfill \\ {Q \approx - \frac{{V_{\text{com}} E}}{Z}\delta .} \hfill \\ \end{array} } \right. $$
(2.20)

Thus, the voltage-active power droop and frequency-reactive power boost (VPD/FQB) characteristics are alternatively considered [2]

$$ \left\{ {\begin{array}{*{20}l} {E = E^{*} - D_{P} P,} \hfill \\ {\omega = \omega^{*} + D_{Q} Q,} \hfill \\ \end{array} } \right. $$
(2.21)

where \( E^{*} \) and \( \omega^{*} \) are the output voltage amplitude and angular frequency of the DG at the no-load condition, respectively. D P and D Q are the droop and boost coefficients, respectively.

Droop and boost characteristics of VPD/FQB method are shown in Fig. 2.11. This approach offers an improved performance for controlling low-voltage microgrids with highly resistive transmission lines. However, it strongly depends on system parameters, and this dependency confines its application. Additionally, the VPD/FQB technique may face a malfunction in the presence of nonlinear loads and cannot guarantee the voltage regulation . Similar to the adjustable load sharing method, the VPD/FQB technique can be modified to adjust the controller time constant without causing voltage and frequency deviations. In the VPD control mode, the common bus voltage, V com, is controlled to follow a reference voltage , V ref.

Fig. 2.11
figure 11

Droop/boost characteristics for low-voltage microgrids : a voltage-active power droop characteristic and b frequency-reactive power boost characteristic. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

$$ E = \left( {K_{P1} + \frac{{K_{I1} }}{s}} \right)\left( {V_{\text{ref}} - V_{\text{com}} } \right), $$
(2.22)

where

$$ V_{\text{ref}} = E^{*} - D_{P} P, $$
(2.23)

and K P1 and K I1 are the proportional and integral gains of the active power controller , respectively. In steady state,

$$ V_{\text{com}} = V_{\text{ref}} = E^{*} - D_{P} P. $$
(2.24)

In the FQB control mode, \( \delta \) is determined by another proportional–integral (PI) controller as

$$ \delta = \left( {K_{P2} + \frac{{K_{I2} }}{s}} \right)\omega , $$
(2.25)

where K P2 and K I2 are the proportional and integral gains of the reactive power controller , respectively. In the modified VPD/FQB method, the time constants of the closed-loop controllers are directly adjusted by the proportional and integral gains, K P1, K I1, K P2, and K I2.

Virtual Frame Transformation Method. An orthogonal linear transformation matrix, T PQ , is used to transfer the active/reactive powers to a new reference frame where the powers are independent of the effective line impedance [16, 17]. For the system shown in Fig. 2.7, T PQ is defined as

$$ \left[ {\begin{array}{*{20}c} {P^{{\prime }} } \\ {Q^{{\prime }} } \\ \end{array} } \right] = {\mathbf{T}}_{PQ} \left[ {\begin{array}{*{20}c} P \\ Q \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\sin \theta } & { - \cos \theta } \\ {\cos \theta } & {\sin \theta } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} P \\ Q \\ \end{array} } \right]. $$
(2.26)

The transformed active and reactive powers, \( P^{{\prime }} \,{\text{and}}\,Q^{{\prime }} \), are then used in droop characteristics in (2.4). The block diagram of this technique is shown in Fig. 2.12.

Fig. 2.12
figure 12

Droop method with virtual power frame transformation. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

Similarly, a virtual frequency /voltage frame transformation is defined as

$$ \left[ {\begin{array}{*{20}c} {\omega^{{\prime }} } \\ {E^{{\prime }} } \\ \end{array} } \right] = {\mathbf{T}}_{\omega E} \left[ {\begin{array}{*{20}c} \omega \\ E \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\sin \theta } & {\cos \theta } \\ { - \cos \theta } & {\sin \theta } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} \omega \\ E \\ \end{array} } \right], $$
(2.27)

where E and \( \omega \) are calculated through the conventional droop equations in (2.4). The transformed voltage and frequency, \( E^{{\prime }} \) and \( \omega^{{\prime }} \), are then used as reference values for the VCVSI voltage control loop [18]. The virtual frame transformation method decouples the active and reactive power controls. However, the applied transformation requires a prior knowledge of the effective line impedance. Moreover, the control method does not consider possible negative impacts of nonlinear loads , does not ensure a regulated voltage, and comprises a basic trade-off between the control loop time constant adjustment and voltage/frequency regulation.

Virtual Output Impedance. An intermediate control loop can be adopted to adjust the output impedance of the VCVSIs [19, 20]. In this control loop, as depicted in Fig. 2.13, the VCVSI output voltage reference, v ref, is proportionally drooped with respect to the output current, i o, i.e.,

Fig. 2.13
figure 13

Block diagram of the virtual output impedance method. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

$$ v_{\text{ref}} = v_{\text{o}}^{*} - Z_{V} (s)i_{o} , $$
(2.28)

where Z V (s) is the virtual output impedance and v *o is the output voltage reference that is obtained by the conventional droop techniques in (2.4). If Z V (s) = sL V is considered, a virtual output inductance is emulated for the VCVSI. In this case, the output voltage reference of the VCVSI is drooped proportional to the derivative of its output current. In the presence of nonlinear loads , the harmonic currents can be properly shared by modifying (2.28) as

$$ v_{\text{ref}} = v_{\text{o}}^{*} - s\sum {L_{Vh} I_{h} } , $$
(2.29)

where I h is the hth current harmonic and L Vh is the inductance associated with I h . L Vh values need to be precisely set to effectively share the current harmonics .

Since the output impedance of the VCVSI is frequency dependent, in the presence of nonlinear loads, THD of the output voltage would be relatively high. This can be mitigated by using a high-pass filter instead of sL V in (2.28)

$$ v_{\text{ref}} = v_{\text{o}}^{*} - L_{V} \frac{s}{{s + \omega_{c} }}i_{o} $$
(2.30)

where \( \omega_{c} \) is the cutoff frequency of the high-pass filter .

If the virtual impedance , Z V , is properly adjusted, it can prevent the occurrence of current spikes when the DG is initially connected to the microgrid . This soft starting can be facilitated by considering a time-variant virtual output impedance as

$$ Z_{V} (t) = Z_{f} - (Z_{f} - Z_{i} )e^{ - t/T} , $$
(2.31)

where Z i and Z f are the initial and final values of the virtual output impedance , respectively. T is the time constant of the start-up process.

Most recently, the virtual output impedance method has been modified for voltage unbalance compensation, caused by the presence of unbalanced loads in the microgrid [12]. The block diagram of the modified virtual output impedance method is shown in Fig. 2.14. As is shown, the measured DG output voltage and current are fed into the positive and negative sequence calculator (PNSC). Outputs of the PNSC, i +o , i o , v +o , and v o , are used to find the positive and negative sequences of the DG active and reactive powers. The negative sequence of the reactive power, \( Q^{ - } \), is multiplied by the v o and then a constant gain, G. The result is then used to find the voltage reference. The constant gain G needs to be fine-tuned to minimize the voltage unbalance without compromising the closed-loop stability [21].

Fig. 2.14
figure 14

Virtual output impedance with voltage unbalance compensator. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

The virtual output impedance method alleviates the dependency of the droop techniques on system parameters. Additionally, this control method properly operates in the presence of nonlinear loads . However, this method does not guarantee the voltage regulation , and adjusting the closed-loop time constant may result in an undesired deviation in the DG voltage and frequency .

Adaptive Voltage Droop Control. In this method, two terms are added to the conventional reactive power control in (2.4). Additional terms are considered to compensate for the voltage drop across the transmission lines that deliver power from the DG to critical loads [11]. For a typical 2-DG system shown in Fig. 2.15, the voltages at first and second buses are

Fig. 2.15
figure 15

A typical two-DG system. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

$$ V_{i} \angle \alpha_{i} = E_{i} \angle \delta_{i} - (r_{i} + jx_{i} )(I_{i} \angle - \theta_{i} ),\quad i = 1,2, $$
(2.32)

where \( I_{i} \angle - \theta_{i} \) is the output current of the ith DG. Using (2.4), one can write

$$ V_{i} = E_{i}^{*} - D_{Qi} Q_{i} - r_{i} I_{i} \cos \gamma_{i} - x_{i} I_{i} \sin \gamma_{i} , $$
(2.33)

where \( \gamma_{i} = \alpha_{i} + \theta_{i} \). The bus voltage of the ith DG can also be formulated in terms of its active and reactive powers, P i and Q i , as

$$ V_{i} = E_{i}^{*} - D_{Qi} Q_{i} - \frac{{r_{i} P_{i} }}{{E_{i}^{*} }} - \frac{{x_{i} Q_{i} }}{{E_{i}^{*} }}. $$
(2.34)

The terms \( r_{i} P_{i} /E_{i}^{*} \) and \( x_{i} Q_{i} /E_{i}^{*} \) represent the voltage drop on the internal impedance r i  + jx i . These terms can be incorporated in the conventional reactive power control of (2.4) to compensate for the voltage drops in the transmission lines as

$$ E_{i} = E_{i}^{*} + \left( {\frac{{r_{i} P_{i} }}{{E_{i}^{*} }} + \frac{{x_{i} Q_{i} }}{{E_{i}^{*} }}} \right) - D_{Qi} Q_{i} $$
(2.35)

Although the reactive power control in (2.35) improves the voltage regulation of the farther buses, it is still dependent on the active power control in (2.4). This problem is resolved by adopting the voltage droop coefficient as a nonlinear function of active and reactive powers [11]

$$ \left\{ {\begin{array}{*{20}l} {E_{i} = E_{i}^{*} + (\frac{{r_{i} P_{i} }}{{E_{i}^{*} }} + \frac{{x_{i} Q_{i} }}{{E_{i}^{*} }}) - D_{i} (P_{i} ,Q_{i} ){\kern 1pt} Q_{i} ,} \hfill \\ {D_{i} (P_{i} ,Q_{i} ) = D_{Qi} + m_{Qi} Q_{i}^{2} + m_{Pi} P_{i}^{2} ,} \hfill \\ \end{array} } \right. $$
(2.36)

where D Qi , m Qi , and m Pi are droop coefficients. The terms m Qi Q 2 i and m Pi P 2 i mitigate the negative impacts of the active power control and the microgrid parameters on the reactive power control .

The adaptive droop method is particularly desirable when the voltage regulation of some buses is not feasible. The higher-order terms in (2.36) significantly improve the reactive power sharing under heavy loading conditions. The potential disadvantage, however, is the required prior knowledge of the transmission line parameters [11]. This control method is not fully functional in the presence of nonlinear loads . Moreover, given the basics discussed for the adjustable load sharing method, adjusting the time constant may result in undesired deviations in DG voltage and frequency .

Signal Injection Method. In this approach, each DG injects a small AC voltage signal to the microgrid. Frequency of this control signal, \( \omega_{q} \), is determined by the output reactive power, Q, of the corresponding DG as

$$ \omega_{q} = \omega_{q0} + D_{Q} Q, $$
(2.37)

where \( \omega_{q0} \) is the nominal angular frequency of injected voltage signals and D Q is the boost coefficient. The small real power transmitted through the signal injection is then calculated, and the RMS value of the output voltage of the DG , E, is accordingly adjusted as

$$ E = E^{*} - D_{P} p_{q} , $$
(2.38)

where E * is the RMS value of the no-load voltage of the DG and D P is the droop coefficient . This procedure is repeated until all VCVSIs produce the same frequency for the control signal.

Here, this technique is elaborated for a system of two DGs shown in Fig. 2.15. It is assumed that D Q is the same for both DGs. Initially, first and second DGs inject low-voltage signals to the system with the following frequencies:

$$ \left\{ {\begin{array}{*{20}l} {\omega_{q1} = \omega_{q0} + D_{Q} {\kern 1pt} Q_{1} ,} \hfill \\ {\omega_{q2} = \omega_{q0} + D_{Q} {\kern 1pt} Q_{2} .} \hfill \\ \end{array} } \right. $$
(2.39)

Assuming Q 1 > Q 2

$$ \Delta \omega = \omega_{q1} - \omega_{q2} = D_{Q} (Q_{1} - Q_{2} ) = D_{Q} {\kern 1pt} \Delta Q $$
(2.40)

The phase difference between the two voltage signals can be obtained as

$$ \delta = \int {\Delta \omega {\text{d}}t} = D_{Q} {\kern 1pt}\Delta Qt. $$
(2.41)

Due to the phase difference between the DGs, a small amount of active power flows from one to the other. Assuming inductive output impedance s for DGs, the transmitted active power from DG1 to DG2, p q1, is

$$ p_{q1} = \frac{{V_{q1} V_{q2} }}{{x_{1} + x_{2} + X_{1} + X_{2} }}\sin \delta , $$
(2.42)

where V q1 and V q2 are the RMS values of the injected voltage signals. Moreover, the transmitted active power in reverse direction, from DG2 to DG1, p q2, is

$$ p_{q2} = - p_{q1} . $$
(2.43)

The DG voltages are adjusted as

$$ \left\{ {\begin{array}{*{20}l} {E_{1} = E^{*} - D_{P} p_{q1} ,} \hfill \\ {E_{2} = E^{*} - D_{P} p_{q2} .} \hfill \\ \end{array} } \right. $$
(2.44)

Herein, it is assumed that D P is the same for both DGs. The difference between the DG output voltages is

$$ \Delta E = E_{1} - E_{2} = - 2D_{P} p_{q1} . $$
(2.45)

Thus, one can write

$$ \left\{ {\begin{array}{*{20}l} {\Delta Q = A{\kern 1pt}\Delta E,{\kern 1pt} } \hfill \\ {A = 2V_{L} \frac{\sin \varphi }{\left| Z \right|} - V_{L} \frac{\sin (\varphi + \delta )}{\left| Z \right|},} \hfill \\ {r_{1} + R_{1} + j(x_{1} + X_{1} ) = r_{2} + R_{2} + j(x_{2} + X_{2} ) = \left| Z \right|\angle \varphi ,} \hfill \\ \end{array} } \right. $$
(2.46)

where V L is the load voltage. The block diagram of the proposed controller is shown in Fig. 2.16.

Fig. 2.16
figure 16

Block diagram of the signal injection method for reactive power sharing. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1], [22]

In the presence of nonlinear loads , parallel DGs can be controlled to participate in supplying current harmonics by properly adjusting the voltage loop bandwidth [22]. For that, first, frequency of the injected voltage is drooped based on the total distortion power, D

$$ \left\{ {\begin{array}{*{20}l} {\omega_{d} = \omega_{d0} - m{\kern 1pt} {\kern 1pt} D,} \hfill \\ {D = \sqrt {S^{2} - P^{2} - Q^{2} } ,} \hfill \\ \end{array} } \right. $$
(2.47)

where \( \omega_{d0} \) is the nominal angular frequency of the injected voltage signals, m is the droop coefficient , and S is the DG nominal power. A procedure similar to (2.39)–(2.42) is adopted to calculate the power transmitted by the injected signal, p d . The bandwidth of VCVSI voltage loop is adjusted as

$$ {\text{BW}} = {\text{BW}}_{0} - D_{\text{bw}} p_{d} , $$
(2.48)

where BW0 is the nominal bandwidth of the voltage loop and D bw is the droop coefficient. The block diagram of the signal injection method is shown in Fig. 2.17.

Fig. 2.17
figure 17

Block diagram of the updated signal injection method. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

Signal injection method properly controls the reactive power sharing and is not sensitive to variations in the line impedances [23]. It also works for linear and nonlinear loads and over various operating conditions. However, it does not guarantee the voltage regulation .

Nonlinear Load Sharing . Some have challenged the functionality of droop techniques in the presence of nonlinear loads [14, 15]. Two approaches for resolving this issue are discussed here. In the first approach [14], the DGs equally share the linear and nonlinear loads . For this purpose, each harmonic of the load current, I h , is sensed to calculate the corresponding voltage droop harmonic, V h , at the output terminal of the DG. The voltage harmonics are compensated by adding 90° leading signals, corresponding to each current harmonic , to the DG voltage reference. Therefore, the real and imaginary parts of the voltage droop associated with each current harmonic are

$$ \left\{ {\begin{array}{*{20}l} {\text{Re} (V_{h} ) = - k_{h} \text{Im} (I_{h} ),} \hfill \\ {\text{Im} (V_{h} ) = k_{h} \text{Re} (I_{h} ),} \hfill \\ \end{array} } \right. $$
(2.49)

where k h is the droop coefficient for the hth harmonic. As a result, the output voltage THD is significantly improved.

In the second approach, the conventional droop method is modified to compensate for the harmonics of the DG output voltage. These voltage harmonics are caused by the distorted voltage drop across the VCVSI output impedance and are due to the distorted nature of the load current [15]. As shown in Fig. 2.18, first, the DG output voltage and current are used to calculate the fundamental term and harmonics of the DG output active and reactive powers, (P 1, Q 1) and (P h , Q h ), respectively. It is noteworthy that distorted voltage and current usually do not carry even harmonics, and thus, h is usually an odd number. P 1 and Q 1 are fed to the conventional droop characteristics in (2.4) to calculate the fundamental term, v *o , of the VCVSI voltage reference, v ref. As shown in Fig. 2.18, to cancel out the output voltage harmonics, a set of droop characteristics are considered for each individual harmonic. Each set of droop characteristics determines an additional term to be included in the VCVSI output voltage reference, v ref, to cancel the corresponding voltage harmonic. Each current harmonic, I h , is considered as a constant current source, as shown in Fig. 2.19. In this figure, \( E_{h} \angle \delta_{h} \) denotes a phasor for the corresponding voltage signal that is included in the voltage reference, v ref. \( Z_{h} \angle \theta_{h} \) represents the VCVSI output impedance associated with the hth current harmonic . The active and reactive powers delivered to the harmonic current source, P h and Q h , are

Fig. 2.18
figure 18

Control block diagram for the harmonic cancelation technique. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

Fig. 2.19
figure 19

hth harmonic equivalent circuit of a DG. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

$$ \left\{ {\begin{array}{*{20}l} {P_{h} = E_{h} I_{h} \cos \delta_{h} - Z_{h} I_{h}^{2} \cos \theta_{h} ,} \hfill \\ {Q_{h} = E_{h} I_{h} \sin \delta_{h} - Z_{h} I_{h}^{2} \sin \theta_{h} .} \hfill \\ \end{array} } \right. $$
(2.50)

When \( \delta_{h} \) is small enough (i.e., \( \sin (\delta_{h} ) = \delta_{h} \)), P h and Q h are roughly proportional to E h and \( \theta_{h} \), respectively. Therefore, the following droop characteristics can be used to eliminate the hth DG output voltage harmonic

$$ \left\{ {\begin{array}{*{20}l} {\omega_{h} = h\omega^{*} - D_{hQ} Q_{h} ,} \hfill \\ {E_{h} = - D_{hP} P_{h} ,} \hfill \\ \end{array} } \right.\quad \quad h \ne 1, $$
(2.51)

where \( \omega^{*} \) is the rated fundamental frequency of the microgrid . D hP and D hQ are the droop coefficients . As is shown in Fig. 2.18, the harmonic reference voltage , \( v_{\text{ref}}^{h} \), for eliminating the hth output voltage harmonic, can be formed with \( E_{h} \) and the phase angle generated from the integration of \( \omega_{h} \).

Primary control techniques are application specific and bring specific features. The active load sharing method provides tight current sharing and high power quality; however, it requires communication links and high-bandwidth control loops . On the other hand, the droop methods provide local controls without any communication infrastructures. The potential advantages and disadvantages of the conventional droop method and its modifications are outlined in Table 2.1, based on which the following statements can be concluded:

Table 2.1 The potential advantages and disadvantages of the discussed droop methods
  • System identification is required to find the line parameters for some techniques, e.g., adaptive voltage droop or virtual frame transformation methods.

  • Modified droop techniques, excluding the ones for low-voltage microgrids, decouple the active and reactive power controls .

  • Adjustable load sharing and adaptive voltage droop methods are the only techniques that offer voltage regulation .

  • Nonlinear loads need to be accommodated with the complicated control techniques such as the virtual impedance , the signal injection, or the nonlinear load sharing methods to achieve a mitigated level of harmonics in the microgrid .

The adjustable load sharing is the only technique where the system time constant can be independently adjusted without affecting the DG voltage and frequency .

2.1.3 Secondary Control

Primary control , as discussed previously, may cause frequency and voltage deviations even in steady state. Although the energy storage devices can compensate for this deviation, they are unable to provide the power for load frequency control over the long term due to their short energy capacity. Primary control is implemented locally at each DG. The secondary control , as a centralized controller, restores the microgrid voltage and frequency and compensates for the deviations caused by the primary control. This level of the control hierarchy is designed to have slower dynamic response than that of the primary, which justifies decoupled dynamics analysis of the primary and the secondary control loops and facilitates their individual designs [1].

Figure 2.20 represents the block diagram of the conventional secondary control with a centralized control structure . As shown in this figure, frequency of the microgrid and the terminal voltage of a given DG are compared with the corresponding reference values, \( \omega_{\text{ref}} \) and \( v_{\text{ref}} \), respectively. Then, the error signals are processed by individual controllers as in (2.52); the resulting signals (\( \delta \omega \) and \( \delta E \)) are sent to the primary controller of the DG to compensate for the frequency and voltage deviations [1, 24]

Fig. 2.20
figure 20

Block diagram of the secondary and tertiary controls . © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

$$ \left\{ {\begin{array}{*{20}l} {\delta \omega = K_{P\omega } (\omega_{\text{ref}} - \omega ) + K_{I\omega } \int {(\omega_{\text{ref}} - \omega )dt + \Delta \omega_{s} ,} } \hfill \\ {\delta E = K_{PE} (v_{\text{ref}} - E) + K_{IE} \int {(v_{\text{ref}} - E)dt} ,} \hfill \\ \end{array} } \right. $$
(2.52)

where \( K_{P\omega } \), \( K_{I\omega } \), \( K_{PE} \), and \( K_{IE} \) are the controller parameters. An additional term, \( \Delta \omega_{s} \), is considered in frequency controller in (2.52) to facilitate synchronization of the microgrid to the main gird. In the islanded operating mode, this additional term is zero. However, during the synchronization, a PLL module is required to measure \( \Delta \omega_{s} \). During the grid-tied operation, voltage and frequency of the main grid are considered as the references in (2.52).

Most recently, the potential function-based optimization technique has been suggested for secondary control [18]. In this method, a potential function is considered for each DG . This function is a scalar cost function that carries all the information on the DG measurements, constraints, and control objectives as

$$ \varphi_{j} (x_{j} ) = w^{u} \sum\limits_{i = 1}^{{n_{u} }} {p_{i}^{u} (x_{j} )} + w^{c} \sum\limits_{i = 1}^{{n_{c} }} {p_{i}^{c} (x_{j} )} + w^{g} p_{j}^{g} (x_{j} ), $$
(2.53)

where \( \varphi_{j} \) is the potential function related to each DG and x j comprises the measurements from the DG unit (e.g., voltage , current, and real and reactive powers). p u i denotes the partial potential functions that reflect the measurement information of the DG. p c i denotes the operation constraints that ensure the stable operation of microgrid . p g j is used to mitigate the DG measurements from the predefined set points . w u, w c, and w g are the weighted factors for the partial potential functions.

The block diagram of the potential function-based technique is shown in Fig. 2.21. In this technique, when the potential functions approach their minimum values, the microgrid is about to operate at the desired states. Therefore, inside the optimizer in Fig. 2.21, set points of the DG are determined so as to minimize the potential functions and thus to meet the microgrid control objectives.

Fig. 2.21
figure 21

The potential function-based technique block diagram. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

The potential function-based technique requires bidirectional communication infrastructure to facilitate data exchange from the DG to the optimizer (measurements) and vice versa (calculated set points). The data transfer links add propagation delays to the control signals. This propagation delay is tolerable, since the secondary controllers are slower than the primary ones.

The secondary control can also be designed to satisfy the power quality requirements, e.g., voltage balancing at critical buses [25]. The block diagram of the voltage unbalance compensator is shown in Fig. 2.22. First, the critical bus voltage is transformed to the d-q reference frame . Once the positive and negative sequence voltages for both d- and q-axis are calculated, one can find the voltage unbalance factor (VUF) as

Fig. 2.22
figure 22

Voltage unbalance compensation in the secondary control . © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

$$ {\text{VUF}} = 100\frac{{\sqrt {(v_{d}^{ - } )^{2} + (v_{q}^{ - } )^{2} } }}{{\sqrt {(v_{d}^{ + } )^{2} + (v_{q}^{ + } )^{2} } }}, $$
(2.54)

where \( v_{d}^{ + } \) and \( v_{d}^{ - } \) are the positive and negative sequence voltages of the direct component and \( v_{q}^{ + } \) and \( v_{q}^{ - } \) are the positive and negative sequence voltages of the quadrature component, respectively. As depicted in Fig. 2.22, the calculated VUF is compared with the reference value, VUF*, and the difference is fed to a PI controller . The controller output is multiplied by the negative sequence of the direct and quadrature voltage components, \( v_{d}^{ - } \) and \( v_{q}^{ - } \), and the results are added to the references of DG voltage controllers to compensate for the voltage unbalance.

2.1.4 Tertiary Control

Tertiary control is the last control level in Fig. 2.1 and operates on the slowest timescale. It considers the economical concerns for optimal operation of the microgrid and manages the power flow between microgrid and main grid [7]. In the grid-tied mode, the power flow between microgrid and main grid can be managed by adjusting the amplitude and frequency of DG . The block diagram of this process is shown in Fig. 2.20. First, active and reactive output powers of the microgrid, P G and Q G , are measured. These quantities are then compared with the corresponding reference values, \( P_{G}^{\text{ref}} \) and \( Q_{G}^{\text{ref}} \), to obtain the frequency and voltage references, \( \omega_{\text{ref}} \) and \( v_{\text{ref}} \) based on

$$ \left\{ {\begin{array}{*{20}l} {\omega_{\text{ref}} = K_{PP} (P_{G}^{\text{ref}} - P_{G} ) + K_{IP} \int {(P_{G}^{\text{ref}} - P_{G} ){\text{d}}t} ,} \hfill \\ {v_{\text{ref}} = K_{PQ} (Q_{G}^{\text{ref}} - Q_{G} ) + K_{IQ} \int {(Q_{G}^{\text{ref}} - Q_{G} ){\text{d}}t,} } \hfill \\ \end{array} } \right. $$
(2.55)

where K PP , K IP , K PQ , and K IQ are the controller parameters [1]. \( \omega_{\text{ref}} \) and \( v_{\text{ref}} \) are further used as the reference values to the secondary control , as in (2.52).

The tertiary control also provides an economically optimal operation, e.g., by using a gossiping algorithm. Generally, the economically optimal operation is satisfied if all the DGs operate at equal marginal costs (variation of the total cost with respect to the variation of the generated power), C opt [26,27,28,29]. In the gossiping algorithm, initially, random output power set points , \( P_{i}^{0} \) and \( P_{j}^{0} \), are considered for the ith DG and its random gossiping partner, jth DG, respectively. Then, considering the prior knowledge about the marginal cost curves of the DGs, the optimal output power of the two DGs, \( P_{i}^{\text{opt}} \) and \( P_{j}^{\text{opt}} \), is determined. At this time, each of the two DGs changes its output power to generate at the optimal point. The aforementioned procedure is illustrated in Fig. 2.23. The same procedure is repeated for other pairs of DGs until the whole DGs in the microgrid operate optimally. Additionally, evolutionary game theory-based techniques are proposed to facilitate the power management by local information and thus to simplify the required communication infrastructures.

Fig. 2.23
figure 23

Marginal cost function matching between two DGs. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Smart Grid [1]

2.2 Dynamic Modeling of AC Microgrids

The microgrid control schemes employ the nonlinear dynamical model of DGs. In this section, the dynamical model of VCVSIs and CCVSIs is elaborated.

2.2.1 Voltage-Controlled Voltage Source Inverters

The block diagram of a voltage-controlled voltage source inverter (VCVSI) -based DG is shown in Fig. 2.24. It contains an inverter bridge , connected to a primary DC power source (e.g., photovoltaic panels or fuel cells). The control loops , including the power, voltage, and current controllers , adjust the output voltage and frequency of the inverter bridge [18, 24, 27]. Given the relatively high switching frequency of the inverter bridge, the switching artifacts can be safely neglected via average-value modeling. As stated in [9], DC bus dynamics can be safely neglected, assuming an ideal source from the DG side.

Fig. 2.24
figure 24

Block diagram of an inverter-based DG . © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Power Systems [33]

It should be noted that the nonlinear dynamics of each DG are formulated in its own d-q (direct–quadrature) reference frame . It is assumed that the reference frame of the ith DG is rotating at the frequency of \( \omega_{i} \). The reference frame of one DG is considered as the common reference frame with the rotating frequency of \( \omega_{\text{com}} \). The angle of the ith DG reference frame, with respect to the common reference frame, is denoted as δ i and satisfies the following differential equation

$$ \dot{\delta }_{i} = \omega_{i} - \omega_{\text{com}} . $$
(2.56)

The power controller block, shown in Fig. 2.25, contains the droop technique in (2.4) and provides the voltage references v *odi and v *oqi for the voltage controller , as well as the operating frequency ω i for the inverter bridge. Two low-pass filters with the cutoff frequency of ω ci are used to extract the fundamental component of the output active and reactive powers, denoted as P i and Q i , respectively. The differential equations of the power controller can be written as

Fig. 2.25
figure 25

Block diagram of the power controller . © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Power Systems [33]

$$ \dot{P}_{i} = - \omega_{\text{ci}} P_{i} + \omega_{\text{ci}} (v_{\text{odi}} i_{\text{odi}} + v_{\text{oqi}} i_{\text{oqi}} ), $$
(2.57)
$$ \dot{Q}_{i} = - \omega_{\text{ci}} Q_{i} + \omega_{\text{ci}} (v_{\text{oqi}} i_{\text{odi}} - v_{\text{odi}} i_{\text{oqi}} ), $$
(2.58)

where v odi, v oqi, i odi, and i oqi are the direct and quadrature components of v oi and i oi in Fig. 2.24. As shown in Fig. 2.25, the primary voltage control strategy for each DG aligns the output voltage magnitude on the d-axis of the corresponding reference frame. Therefore,

$$ \left\{ {\begin{array}{*{20}l} {v_{\text{odi}}^{*} = E_{i}^{*} - D_{Qi} Q_{i} ,} \hfill \\ {v_{\text{oqi}}^{*} = 0.} \hfill \\ \end{array} } \right. $$
(2.59)

The block diagram of the voltage controller is shown in Fig. 2.26. The differential algebraic equations of the voltage controller are written as

Fig. 2.26
figure 26

Block diagram of the voltage controller . © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Power Systems [33]

$$ \dot{\phi }_{\text{di}} = v_{\text{odi}}^{*} - v_{\text{odi}} , $$
(2.60)
$$ \dot{\phi }_{\text{qi}} = v_{\text{oqi}}^{*} - v_{\text{oqi}} , $$
(2.61)
$$ i_{\text{ldi}}^{*} = F_{i} i_{\text{odi}} - \omega_{b} C_{fi} v_{\text{oqi}} + K_{PVi} (v_{\text{odi}}^{*} - v_{\text{odi}} ) + K_{\text{IVi}} \phi_{\text{di}} , $$
(2.62)
$$ i_{\text{lqi}}^{*} = F_{i} i_{\text{oqi}} + \omega_{b} C_{\text{fi}} v_{\text{odi}} + K_{\text{PVi}} (v_{\text{oqi}}^{*} - v_{\text{oqi}} ) + K_{\text{IVi}} \phi_{\text{qi}} , $$
(2.63)

where \( \phi_{\text{di}} \) and \( \phi_{\text{qi}} \) are the auxiliary state variables defined for PI controllers in Fig. 2.26 and ω b is the nominal angular frequency . Other parameters are shown in Figs. 2.24 and 2.26.

The block diagram of the current controller is shown in Fig. 2.27. The differential algebraic equations of the current controller are written as

Fig. 2.27
figure 27

Block diagram of the current controller . © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Power Systems [33]

$$ \dot{\gamma }_{\text{di}} = i_{\text{ldi}}^{*} - i_{\text{ldi}} , $$
(2.64)
$$ \dot{\gamma }_{\text{qi}} = i_{\text{lqi}}^{*} - i_{\text{lqi}} , $$
(2.65)
$$ v_{\text{idi}}^{*} = - \omega_{b} L_{\text{fi}} i_{\text{lqi}} + K_{\text{PCi}} (i_{\text{ldi}}^{*} - i_{\text{ldi}} ) + K_{\text{ICi}} \gamma_{\text{di}} , $$
(2.66)
$$ v_{\text{iqi}}^{*} = \omega_{b} L_{\text{fi}} i_{\text{ldi}} + K_{\text{PCi}} (i_{\text{lqi}}^{*} - i_{\text{lqi}} ) + K_{\text{ICi}} \gamma_{\text{qi}} , $$
(2.67)

where γ di and γ qi are the auxiliary state variables defined for the PI controllers in Fig. 2.27. i ldi and i lqi are the direct and quadrature components of i li in Fig. 2.24. Other parameters are shown in Figs. 2.24 and 2.27.

The differential equations for the output LC filter and output connector are as follows:

$$ \dot{i}_{\text{ldi}} = - \frac{{R_{\text{fi}} }}{{L_{\text{fi}} }}i_{\text{ldi}} + \omega_{i} i_{\text{lqi}} + \frac{1}{{L_{\text{fi}} }}v_{\text{idi}} - \frac{1}{{L_{\text{fi}} }}v_{\text{odi}} , $$
(2.68)
$$ \dot{i}_{\text{lqi}} = - \frac{{R_{\text{fi}} }}{{L_{\text{fi}} }}i_{\text{lqi}} - \omega_{i} i_{\text{ldi}} + \frac{1}{{L_{\text{fi}} }}v_{\text{iqi}} - \frac{1}{{L_{\text{fi}} }}v_{\text{oqi}} , $$
(2.69)
$$ \dot{v}_{\text{odi}} = \omega_{i} v_{\text{oqi}} + \frac{1}{{C_{\text{fi}} }}i_{\text{ldi}} - \frac{1}{{C_{\text{fi}} }}i_{\text{odi}} , $$
(2.70)
$$ \dot{v}_{\text{oqi}} = - \omega_{i} v_{\text{odi}} + \frac{1}{{C_{\text{fi}} }}i_{\text{lqi}} - \frac{1}{{C_{\text{fi}} }}i_{\text{oqi}} , $$
(2.71)
$$ \dot{i}_{\text{odi}} = - \frac{{R_{\text{ci}} }}{{L_{\text{ci}} }}i_{\text{odi}} + \omega_{i} i_{\text{oqi}} + \frac{1}{{L_{\text{ci}} }}v_{\text{odi}} - \frac{1}{{L_{\text{ci}} }}v_{\text{bdi}} , $$
(2.72)
$$ \dot{i}_{\text{oqi}} = - \frac{{R_{\text{ci}} }}{{L_{\text{ci}} }}i_{\text{oqi}} - \omega_{i} i_{\text{odi}} + \frac{1}{{L_{\text{ci}} }}v_{\text{oqi}} - \frac{1}{{L_{\text{ci}} }}v_{\text{bqi}} . $$
(2.73)

Equations (2.56)–(2.73) form the large-signal dynamical model of the ith DG . The large-signal dynamical model can be written in a compact form as

$$ \left\{ {\begin{array}{*{20}l} {\dot{x}_{i} = {\mathbf{f}}_{i} (x_{i} ) + {\mathbf{k}}_{i} (x_{i} ){\mathbf{D}}_{i} + {\mathbf{g}}_{i} (x_{i} )u_{i} ,} \hfill \\ {y_{i} = h_{i} (x_{i} ),} \hfill \\ \end{array} } \right. $$
(2.74)

where the state vector is

$$ x_{i} = [\begin{array}{*{20}c} {\delta_{i} } & {P_{i} } & {Q_{i} } & {\phi_{\text{di}} } & {\phi_{\text{qi}} } & {\gamma_{\text{di}} } & {\gamma_{\text{qi}} } & {i_{\text{ldi}} } & {i_{\text{lqi}} } \\ \end{array} \quad \begin{array}{*{20}c} {v_{\text{odi}} } & {v_{\text{oqi}} } \\ \end{array} \quad \begin{array}{*{20}c} {i_{\text{odi}} } & {i_{\text{oqi}} } \\ \end{array} ]^{T} . $$
(2.75)

The term D i  = [ω com v bdi v bqi]T is considered as a known disturbance . The detailed expressions for f i (x i ), g i (x i ), and k i (x i ) can be extracted from (2.56) to (2.73).

2.2.2 Current-Controlled Voltage Source Inverters

The block diagram of a current-controlled voltage source inverter (CCVSI)-based DG is shown in Fig. 2.28. It contains an inverter bridge , connected to a primary DC power source. The current controller adjusts the direct and quadrature terms of output current i oi. As shown in Fig. 2.29, a control block is used to calculate the angle of the ith CCVSI reference frame with respect to the common reference frame \( \alpha_{i} \) such that the quadrature term of output voltage v oqi becomes zero. This control block is named as \( \alpha_{i} \) calculator.

Fig. 2.28
figure 28

Block diagram of a CCVSI. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Industrial Informatics [34]

Fig. 2.29
figure 29

Block diagram of α i calculator. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Industrial Informatics [34]

The block diagram of the current controller is shown in Fig. 2.30. The differential algebraic equations of the current controller are written as

Fig. 2.30
figure 30

Block diagram of the current controller for a CCVSI. © [2016] IEEE. Reprinted, with permission, from IEEE Transactions on Industrial Informatics [34]

$$ \dot{\gamma }_{\text{di}} = i_{\text{drefi}} - i_{\text{odi}} , $$
(2.76)
$$ \dot{\gamma }_{\text{qi}} = i_{\text{qrefi}} - i_{\text{oqi}} , $$
(2.77)
$$ v_{\text{idi}}^{*} = v_{\text{odi}} - \omega_{b} L_{\text{fi}} i_{\text{oqi}} + K_{\text{PCi}} (i_{\text{drefi}} - i_{\text{odi}} ) + K_{\text{ICi}} \gamma_{\text{di}} , $$
(2.78)
$$ v_{\text{iqi}}^{*} = v_{\text{oqi}} + \omega_{b} L_{\text{fi}} i_{\text{odi}} + K_{\text{PCi}} (i_{\text{qrefi}} - i_{\text{oqi}} ) + K_{\text{ICi}} \gamma_{\text{qi}} , $$
(2.79)

where γ di and γ qi are the auxiliary state variables defined for the PI controllers in Fig. 4.4. i odi and i oqi are the direct and quadrature components of output current i oi in Fig. 4.2. Other parameters are shown in Figs. 4.2 and 4.4. Assuming that the inverter bridge produces the demanded voltage , i.e., \( v_{\text{idi}}^{*} = v_{\text{idi}} \) and \( v_{\text{iqi}}^{*} = v_{\text{iqi}} \), the dynamics of output RL filter can be written as

$$ \dot{i}_{\text{odi}} = - \frac{{R_{\text{fi}} }}{{L_{\text{fi}} }}i_{\text{odi}} + \omega_{\text{com}} i_{\text{oqi}} + \frac{1}{{L_{\text{fi}} }}v_{\text{idi}} - \frac{1}{{L_{\text{fi}} }}v_{\text{odi}} , $$
(2.80)
$$ \dot{i}_{\text{oqi}} = - \frac{{R_{\text{fi}} }}{{L_{\text{fi}} }}i_{\text{oqi}} - \omega_{\text{com}} i_{\text{odi}} + \frac{1}{{L_{\text{fi}} }}v_{\text{iqi}} - \frac{1}{{L_{\text{fi}} }}v_{\text{oqi}} . $$
(2.81)

Equations (2.76)–(2.81) form the large-signal dynamical model of the ith CCVSI. The large-signal dynamical model can be written in a compact form as

$$ \left\{ {\begin{array}{*{20}l} {\dot{x}_{\text{CCi}} = {\mathbf{f}}_{\text{CCi}} (x_{\text{CCi}} ) + {\mathbf{k}}_{\text{CCi}} (x_{\text{CCi}} ){\mathbf{D}}_{\text{CCi}} + {\mathbf{g}}_{\text{CCi}} (x_{\text{CCi}} )u_{\text{CCi}} } \hfill \\ {y_{\text{CCi}} = h_{\text{CCi}} (x_{\text{CCi}} ) + d_{\text{CCi}} u_{\text{CCi}} } \hfill \\ \end{array} } \right., $$
(2.82)

where the state vector is

$$ x_{\text{CCi}} = \left[ {\begin{array}{*{20}c} {\gamma_{\text{di}} } & {\gamma_{\text{qi}} } & {i_{\text{odi}} } & {i_{\text{oqi}} } \\ \end{array} } \right]^{T} . $$
(2.83)

The term D CCi  = [ω com v odi]T is considered as a known disturbance . The detailed expressions for f CCi(x CCi), g CCi(x CCi), and k CCi(x CCi) can be extracted from (2.76) to (2.81).

2.3 Control of DC Microgrids

Although inverter-based AC microgrids have been prevalent, DC microgrids are currently emerging at distribution levels. The DC nature of emerging renewable energy sources (e.g., solar) or storage units (e.g., batteries and ultracapacitors) efficiently lends itself to a DC microgrid paradigm that avoids redundant conversion stages [30]. Many of the new loads are electronic DC loads (e.g., in data centers). Even some traditional AC loads, e.g., induction machines, can appear as DC loads when controlled by inverter-fed drive systems.

DC microgrids are also shown to have about two orders-of-magnitude more availability compared to their AC counterparts, thus making them ideal candidates for mission-critical applications [22, 31]. Moreover, DC microgrids can overcome some disadvantages of AC systems, e.g., transformer inrush current, frequency synchronization , reactive power flow , phase unbalance, and power quality issues [32].

2.3.1 Control Objectives

A DC microgrid is an interconnection of DC sources and DC load through a transmission/distribution network. Given the intermittent nature of electric loads, sources must be dynamically controlled to provide load power demand at any moment, while preserving a desired voltage at consumer terminals. Sources may reflect a variety of rated powers. It is desired to share the total load demand among these sources in proportion to their rated power; such load sharing approach is widely known as proportional load sharing. This approach prevents overstressing of sources and helps to span lifetime of the power-generating entities in the microgrid . While the source voltages are the sole variables controlling power flow, they must be tightly managed to also ensure a desirable voltage regulation .

2.3.2 Standard Control Technique

A hierarchical structure, illustrated in Fig. 2.31, is widely used to control DC sources. This structure includes primary, secondary, and tertiary levels, where the primary has the highest and the tertiary has the lowest [7].

Fig. 2.31
figure 31

Hierarchical control structure for DC systems. © [2017] IEEE. Reprinted, with permission, from IEEE Transactions on Industrial Electronics [7]

  1. A.

    Primary Control

This controller uses droop mechanism to handle proportional load sharing. Figure 2.32 explains the functionality of the primary controller for two sources with identical rated powers. Therein, a virtual resistance, \( R_{D} \), is introduced to the output of each source. While the load sharing benefits from this virtual resistance, it is not a physical impedance and, thus, does not cause any power loss. In this stage, the voltage controllers inside each source follow the voltage reference generated by the droop mechanism, i.e.,

Fig. 2.32
figure 32

Primary and secondary control algorithms. © [2017] IEEE. Reprinted, with permission, from IEEE Transactions on Industrial Electronics [7]

$$ v_{o}^{ * } = v_{\text{ref}} - R_{D} .i_{o} $$
(2.84)

where \( v_{o}^{ * } \) is the reference voltage for the inner-loop voltage controller , \( R_{D} \) is the droop coefficient , \( v_{\text{ref}} \) is the rated voltage of the microgrid , and \( i_{o} \) is the output current of the source. In steady state, given low distribution line resistances, all terminal voltages converge to the same value. Given identical rated voltages used at all sources, one can conclude that the droop terms, \( R_{D} .i_{o} \), will share identical values as well. This, equivalently, implies that the total load is shared among sources in inverse proportion to their droop coefficients. By choosing the droop coefficients in inverse proportion to the source power ratings, the droop mechanism will successfully manage proportional load sharing.

  1. B.

    Secondary Control

Although the droop controller satisfies a desired load sharing, the droop term, \( R_{D} .i_{o} \), leaves a voltage deviation from the rated voltage of, \( v_{\text{ref}} \), all across the network. The secondary controller serves as voltage restoration here. As shown in Fig. 2.32, it senses the microgrid voltage and compares it with the desired voltage of \( v_{\text{MG}}^{*} \) through a controller, \( G_{\text{MG}} (s) \); the controller is usually a proportional–integral (PI) module. The controller generates a voltage correction term , \( \delta v_{o} \), which is relayed to all sources. The sources then use \( v_{\text{ref}} + \delta v_{o} \) as the reference in the droop mechanism instead of the \( v_{\text{ref}} \) itself. The term \( \delta v_{o} \) boosts all voltages across the system until, within this closed-loop feedback control mechanism, all voltages be restored on the reference value of \( v_{\text{MG}}^{*} \). It should be noted that \( v_{\text{MG}}^{*} \) and \( v_{\text{ref}} \) may not be the same values; however, they are usually equal.

  1. C.

    Tertiary Control

Power generation in the microgrid may exceed the local power demand, particularly when the maximum power is to be absorbed from renewable energy sources. In such a case, the excess power will be transmitted directly to a high-inertia DC system or to the main AC grid through an inverter . On the other side, when locally generated power is short of the load demand, a high-inertia DC system or AC grid will provide power to fill up the need. Such bidirectional power exchange with a high-inertia system requires a separate controller called tertiary control . As demonstrated in Fig. 2.33, tertiary controller compares the power flow between the two power grids with a reference value of \( i_{G}^{*} \) and accordingly updates the reference voltage of the microgrid, \( v_{\text{MG}}^{*} \). Generally, as \( v_{\text{MG}}^{*} \) increases, the DC microgrid sends out more power and vice versa.

Fig. 2.33
figure 33

Tertiary control for grid-connected operation. © [2017] IEEE. Reprinted, with permission, from IEEE Transactions on Industrial Electronics [7]