## 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.

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 single-phase 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).

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 closed-loop transfer function is given by Eq. (3).

### 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 *L*_{1}, *L*_{2,} and *C* parameters. It can also allow one to select appropriate *K*_{p}, *K*_{i}, 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

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:

*L*_{1} = 6.55 mH, *L*_{2} = 0.295 mH, *C* = 34.4 μF, *K*_{p} = 2.278, *K*_{i} = 28.34, *K* = 4 2.9, *f*_{sampling} = 100 kHz, *f*_{sw} = 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 *f*_{res} = 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 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 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.

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 |

Connection | On | On | On | Initial: On Off: 6.02 s In: 7.02 s | Initial: Off In: 4.02 s Off: 5.02 s |

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 self-generated 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 *P*1 in **Figure 1**. Then such information is utilized to generate an error signal which is fed to a *P*1 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 **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 *v*_{g}(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.

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

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 grid-forming 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.

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 *C*1 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 *C*1. 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**.

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 *P*1, *P*2, and *P*3, 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 voltages at *P*1 and *P*2 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 grid-supporting 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 *P*2 and operates under PQ control, its reference real power has the flexibility of varying either with the voltage at *P*2 (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 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 *C*1 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 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**.

## 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 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.

Load | 1 (PQ) | 2 (PQ) | 3 (PQ) | 4 (RL) |
---|---|---|---|---|

P (kW) | 30 | 10 | 10 | 10 |

Q (kvar) | 0 | 7.5 | 15 | 10 |

Connection | On | Initial: off 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: – |

There are two cases studied for the single-phase microgrid. In the first case, DG1 acts as a grid-forming 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 *P*5 in **Figure 31** compensates reactive power demanded in the direction of current *I*_{cp} 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.

As the dynamic load changes and the change of renewable energy generation happens at the coupling points *P*2, *P*3, and *P*4 in **Figure 31**, the real power output of the grid-forming generator does not vary much after reaching a stable point. Nevertheless, the two grid-supporting 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.

At 4.0 s, load 2 that is connected at *P*2, 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 *P*3 and *P*4. Due to the collaborative effort of DG1 and DG2, the voltages at points of *P*1, *P*2, *P*3, and *P*4 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 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 *P*5 in **Figure 31** again compensates reactive power demanded in the direction of current *I*_{cp} 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 grid-supporting 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.