**1. Introduction**

Increasing amounts of distributed renewable energy sources (RESs), such as solar and wind, are expected to be integrated into the power system to meet the ever-growing energy demand, and more importantly, to meet the need to preserve fossil fuel resources. As a result, the existing electrical power grid will be experiencing a shift from the traditional single-sourced, radial framework network to the multi-sourced, meshed network of the next generation—the Internet of Energy (IOE) [1–4]. However, as the demand keeps rising for higher penetration of RESs, there are many technical challenges yet to be overcome [5]. One of them is that existing technologies rely heavily on energy storage (ES) systems to maintain instant power balance and minimize the impact to the power grid due to the intermittent nature of the RES outputs [6–9]. Unfortunately, the costs of ES units (such as batteries) still remain high and are not yet economically practical for large scale deployment [10]. For example, the capital cost of lithium-ion batteries for microgrid and residential implementations are up to \$1000 and \$1500 per kWh, respectively [11]. Besides batteries, there are other types of energy storage technologies such as the flywheel, pumped hydro power, compressed air [12], vehicle-to-grid [13] and power-to-gas [14]. Each technology has unique features, but none of them can meet all the requirements of being robust, reliable and economically competitive [15–17]. Therefore, there is a need to develop flexible and sophisticated energy management strategies as a way of maintaining the energy balance

and operational stability of the power system, and to alleviate the dependency on large-scale energy storage units for the time being.

Owing to technical advances in the fields of power electronics and communication, in recent years, research on intelligent and multi-functional energy converter—the energy router (ER)—has been booming rapidly [18–21]. With the functionalities of flexible power flow control and wide area information interaction, the energy router has demonstrated great potential to serve as the "energy hub" in the Internet of Energy. More encouragingly, it is now technically and economically feasible for the energy router to serve as the "energy and information sink node" at the levels of the microgrid [22] and home-area network [23,24], by providing multiple functionalities: (1) working as a smart electrical interface, by enabling flexible, adjustable and bidirectional energy flow between the microgrid and the power grid [25,26]; (2) facilitating optimal energy management within the microgrid and improving the efficiency, reliability and economy of the system [22]; and (3) enabling wide-area data collection from various devices (including RESs, electric equipment and loads) in real time, and providing these data to the control center of the microgrid or to the main grid for load forecasting [27], operational status monitoring [28] and fault diagnosis [29,30]. With all these functionalities, the energy router is naturally considered to be a perfect candidate to deploy flexible and sophisticated energy management strategies.

This paper elaborates on a novel and flexible interconnecting framework for microgrids, and corresponding energy management strategies are presented, in response to the situation of increasing renewable energy penetration and the need to alleviate dependency on energy storage equipment. Different from the traditional manner of connection, this framework distinguishes itself by interconnecting the main grid and multiple microgrids via the energy router, and enabling flexible energy exchange among them.

The key idea is proposed based on the following considerations: (1) microgrids serving different purposes may differ substantially in terms of network architecture, type of RESs and loads within them; and therefore, their energy profiles of power production and consumption of the day may also differ; (2) this difference in the profiles of energy production and consumption usually leads to "complementarities" in their time periods of peak and valley demand. These complementarities can thus be utilized to compensate for each other's instant energy deficiency. For example, residential areas with rooftop solar energy will have an energy surplus during the day and peak demand in the evening, while commercial or office areas have different peak times of power consumption. If their locations are adjacent, it would definitely be beneficial for both communities if the surplus energy from the rooftop solar supply can be transferred to the areas in short energy supply. It is also beneficial to the main grid, since excessive solar power injections into the distribution network will lead to overvoltage in low voltage (LV) feeders [31]. Therefore, in comparison to the existing microgrid control methods, the work of this paper is focused on a novel framework to establish electrical interconnection and energy trade between microgrids. This work also presents a new paradigm to utilize direct energy consumption to suppress the impact of DER output fluctuations on the stability and reliability of the power system.

The rest of the paper will be arranged as follows: the analytical model is established for the whole system including the interconnected microgrids and the main grid, as well as the energy router, which is based on multiport bidirectional VSCs and a shared DC power line. Various operational modes of the interconnected microgrids facilitated by the energy router are analyzed, and corresponding control strategies are developed. Simulations are carried out on the Matlab/Simulink (R2014b, MathWorks, Natick, MA, USA) platform to demonstrate the validity and reliability of the presented interconnection framework and the corresponding energy control strategies.

#### **2. Energy Router-Based Interconnecting Framework for Microgrids**

The energy router-based framework for microgrid interconnection is demonstrated in Figure 1, where the energy router serves as an energy hub to establish electrical connections between the microgrids and the main grid. Its beneficial effects include: (1) the problem of instant energy surplus or deficiency can be resolved with "complementary" energy exchanges between the adjacent microgrids, thus relieving dependency on large-scale energy storage deployment. The impacts caused by the uncertainties and intermittencies of the DER outputs to the microgrid system, and also to the main grid, can further be alleviated to some extent; (2) the VSC converters and shared DC bus facilitate electrical isolation (in voltage, frequency and phase angle) between the microgrids and the main grid [32]. Each microgrid can have "stand-alone" voltage, frequency and phase angle according to its own operational situation, savingefforts for synchronization with the power grid or the other microgrids; (3) this isolation ensures that any voltage or frequency fluctuation at one end of the energy router (either on the microgrid side or the main grid side) will have no direct impact on the systems on other sides of the energy router, thus guaranteeing power quality and operation reliability; and (4) widespread implementation of the energy routers will promote the shift of the power system architecture from the traditional "tree-structure" hierarchical framework to a more connective and interactive framework. This final consequence will help to improve the power supply quality and the reliability of the whole system, which is an essential step in building the Internet of Energy of the future.

**Figure 1.** Energy router-based interconnecting framework for the microgrids system.

As shown in Figure 2, the schematic of the power router is based on multiport bidirectional voltage source converters (VSCs) and a shared DC power line. In this paper, we instigate the implementation of a three-port schematic—one port for connection to the main grid, and the other two for interconnections to adjacent microgrids. The VSCs in each port can operate in either rectifier or inverter mode, thus enabling bi-directional power flow control between the alternating current (AC) and shared DC power lines.

**Figure 2.** Schematic block diagram of the energy router.

With the DC power line serving as an "energy pool", autonomous energy trade can be performed between the interconnected microgrids without the intervention of the VSC on the main grid side. Energy flow management is easy and flexible, enabled by the multiport energy router. Besides the existing tied and islanded operational modes, there will be a new operational mode for the microgrids—the Parallel Mode. This will happen when a microgrid is having energy exchange (either

input or output) only with the adjacent microgrid. For example, a microgrid providing excessive energy to its neighboring microgrid is working in the parallel mode; it does not have any energy exchange with the main grid, even when the VSC on the grid side is still in operation.

The various operational modes enabled by the energy router are demonstrated in Figure 3. According to the energy flow indicated in this figure, the operational modes of each microgrid can be summarized as:


**Figure 3.** Operational modes enabled by the energy router: (**a**) case 1: grid-connected mode; (**b**) case 2: grid connected mode vs. islanded mode; (**c**) case 3: grid connected mode vs. parallel mode; and (**d**) case 4: parallel mode.

#### **3. Topology and Mathematical Model of the Energy Router**

#### *3.1. Topology of the Energy Router*

The topology of the energy router considered in this paper is shown in Figure 4. In practice, it can be regarded as a tri-port energy converter that comprises three VSCs with their RLC filters and a shared common DC power line.

**Figure 4.** The detailed topology of the energy router.

Let VSC*i* (*i* = 0, 1, 2) represent the VSCs of the energy router, in which VSC0 is on the power grid side, while VSC1 and VSC2 are on the microgrid side. Assume that the VSCs and the corresponding RLC filters are three-phase symmetry circuits. As shown in Figure 4, *eabci* and *iabci* (*i* = 0, 1, 2) are the three-phase voltages and currents on the AC side, *k* is the transformer ratio, *Ci* = *Cai* = *Cbi* = *Cci* are the single-phase capacitance of the RLC filters, *Li* = *Lai* = *Lbi* = *Lci* are the single-phase inductance of the RLC filters, *Ri* = *Rai* = *Rbi* = *Rci* are the equivalent single-phase resistance of the RLC filters, *vabci* are the three-phase output voltage of the VSC*i*, *Cdc* is the capacitance of the DC power line, *udc* is the DC-link voltage and *idci* is the DC current flowing in or out of the VSC*i*.

#### *3.2. Analytical Model of the Energy Router*

Because the VSC on the main grid side shall be working in a different pattern from the VSCs on the microgrid side, the model of the VSCs shall be described differently. According to the operation modes enabled by the energy router, as shown in Figure 3, VSC0 only works in the rectifier status, whereas VSC1 and VSC2 can work in either the rectifier or inverter statuses (which should be described by different model representations). Hence, the case in Figure 3c is taken as an example to formulate the state-space representations of the VSCs. In this situation, VSC0 and VSC2 work as rectifiers, and VSC1 works as an inverter.

The uni-polar logic switching function *sj* is defined as:

$$s\_{\circ} = \begin{cases} 1 \text{ upper bridge legs are on and lower off} \\ 0 \text{ upper bridge legs are off and lower on} \end{cases} \text{ j} = a, b, c. \tag{1}$$

Then, the three-phase circuit equations of the VSC0 are established and transformed into the *dq* rotating coordinate system, as shown in the following equations:

$$\begin{cases} L\_{\Sigma} \frac{di\_{d0}}{dt} = -R\_0 i\_{d0} + \omega\_0 L\_{\Sigma} i\_{q0} + \frac{1}{k} \varepsilon\_{d0} - \mu\_{d\varepsilon} \mathbf{s}\_{d0} \\\ L\_{\Sigma} \frac{di\_{q0}}{dt} = -R\_0 i\_{q0} - \omega\_0 L\_{\Sigma} i\_{d0} + \frac{1}{k} \varepsilon\_{q0} - \mu\_{d\varepsilon} \mathbf{s}\_{q0} \end{cases} \tag{2}$$

in which *L*<sup>Σ</sup> = *LT* + *L*<sup>0</sup> is the equivalent inductance on the AC side of VSC0, *LT* is the equivalent inductance of the transformer, *idi* and *iqi* are the components of *iabci* in the *d* and *q* axes, *ω<sup>i</sup>* is the angular frequency of the AC system, *edi* and *eqi* are the components of *eabci* in the *d* and *q* axes, *k* is the transformer ratio, and *sdi* and *sqi* are the components of the switching function in the *d* and *q* axes of the *dq* rotating coordinate system.

The current flowing in or out of the VSC*i* can be calculated by:

$$i\_{dci} = \frac{3}{2} (s\_{di}i\_{di} + s\_{qi}i\_{qi}).\tag{3}$$

The current balance equation of the DC power line is:

$$\mathcal{C}\_{d\varepsilon} \frac{d u\_{d\varepsilon}}{dt} = i\_{d\varepsilon 0} - (i\_{d\varepsilon 1} + i\_{d\varepsilon 2}). \tag{4}$$

Substituting Equation (3) into Equation (4), Equation (5) can be derived:

$$\mathbf{C}\_{dc}\frac{d\mathbf{u}\_{dc}}{dt} = \frac{3}{2}(\mathbf{s}\_{d0}\dot{\mathbf{i}}\_{d0} + \mathbf{s}\_{q0}\dot{\mathbf{i}}\_{q0}) - \frac{3}{2}(\mathbf{s}\_{d1}\dot{\mathbf{i}}\_{d1} + \mathbf{s}\_{q1}\dot{\mathbf{i}}\_{q1} + \mathbf{s}\_{d2}\dot{\mathbf{i}}\_{d2} + \mathbf{s}\_{q2}\dot{\mathbf{i}}\_{q2}).\tag{5}$$

Similarly, the mathematical models of the VSC1 working in the inverter status and VSC2 working in the rectifier status can be derived as:

$$\begin{cases} L\_1 \frac{di\_{d1}}{dt} = -R\_1 i\_{d1} + \omega\_1 L\_1 i\_{q1} - \varepsilon\_{d1} + \mathfrak{u}\_{dc} \mathfrak{s}\_{d1} \\\ L\_1 \frac{di\_{q1}}{dt} = -R\_1 i\_{q1} - \omega\_1 L\_1 i\_{d1} - \varepsilon\_{q1} + \mathfrak{u}\_{dc} \mathfrak{s}\_{q1} \end{cases}, \text{and} \tag{6}$$

$$\begin{cases} L\_2 \frac{di\_{d2}}{dt} = -R\_2 i\_{d2} + \omega\_2 L\_2 i\_{q2} + \varepsilon\_{d2} - \mathfrak{u}\_{dc} \mathfrak{s}\_{d2} \\\ L\_2 \frac{di\_{q2}}{dt} = -R\_2 i\_{q2} - \omega\_2 L\_2 i\_{d2} + \varepsilon\_{q2} - \mathfrak{u}\_{dc} \mathfrak{s}\_{q2} \end{cases} . \tag{7}$$

Equations (2) and (5)–(7) constitute the analytical model of the energy router in the situation represented in Figure 3c, in which the microgrid 1 is in the grid-connected mode and microgrid 2 in the parallel mode. Models of the energy router operating in the other situations represented in Figure 3 can also be derived in the same way.

#### **4. Energy Control Strategies of the Energy Router**

#### *4.1. Control Schematic of the VSCs*

The VSCs in the energy router are under dual-loop control, and the controller structure of the VSCs is shown in the Figure 5.

The dual-loop controller mainly consists of four modules: (1) the inner-loop controller, also known as the current feedback loop; (2) the outer-loop controller, which can either be a DC voltage controller or an active/reactive power controller, depending on the control objective of each VSC; (3) the phase-locked loop (PLL), which can be used to obtain the phase angle of the AC voltage for Park's Transformation; and (4) the pulse width modulation (PWM) controller.

As shown in Figure 5, *iidre*<sup>f</sup> and *iiqref* are the references of *idi* and *iqi*, while *Udcref* is the reference of *udc*. As the VSC1 and VSC2 are identical in their structures, the detail of the controller of VSC2 is not shown in the Figure 5.

**Figure 5.** Control schematic of the VSCs.

#### *4.2. Control Patterns for the VSCs*

The VSCs of the energy router are working in the master/slave mode. For the master VSC, its outer-loop controller shall be working as the DC voltage controller, with its goal being to maintain stable and constant DC-link voltage. The rest of the VSCs shall be the slave converters, working in the manner of power transfer following up. Their out-loop controllers shall be working as the active/reactive power controllers, with the goal being to keep their power transfer following up the needs of the microgrids in connection.

The rules to choose the master converter are thus: (1) when the main grid is involved in power transfer, VSC0 is preferred as the master converter and the VSCs on the microgrid side are the slave converters; (2) when the main grid is not involved in energy exchange, the master converter shall be the VSC in connection with the microgrid which provides energy to its neighbor, while the VSC which intakes energy shall be the slave converter.

As defined in Table 1, there are three control patterns for the VSCs according to the operational status of their inner- and outer-loop controllers. The various operational modes of the microgrids are realized by choosing appropriate control patterns for the VSCs, which will also determine the roles of the VSCs (master or slave) in the process of power flow. For the master converter, the outer-loop controller shall be working as the DC voltage controller while the inner-loop controller will keep the H-bridge of the converter working in the rectifier status. Thus, the master converter should be working in control pattern 1. Meanwhile, a slave converter can be selected to work in either pattern 2 or pattern 3, according to the role it plays in the process of power flow. In other words, the control pattern of a VSC is determined by the operational mode of the microgrid in connection with it.

**Table 1.** Definition of the control patterns for VSCs under different operational conditions.


The control patterns of the VSCs can be listed as follows:

(1) once the main grid is involved in power transfer, VSC0 is chosen to be the master converter, working in pattern 1;


The corresponding control patterns of each VSC, along with the operational modes of the microgrids, in the four cases of Figure 3 can thus be summarized as shown in Table 2.

**Table 2.** Operational modes of the microgrids vs. VSC control patterns in Figure 3a–d.


#### *4.3. Control Patterns for the Energy Router*

For the RESs, ESs and loads in the microgrids, the required active power of microgrid 1 and microgrid 2 can be calculated by:

$$P\_1 = P\_{\rm DG1} + P\_{\rm hot1} - P\_{\rm load1}, \\ P\_2 = P\_{\rm DG2} + P\_{\rm hot2} - P\_{\rm load2} \tag{8}$$

where the *DG* outputs in microgrid 1 and microgrid 2 are denoted by *PDG*<sup>1</sup> and *PDG*2, the energy stored in ESs are *Pbat*<sup>1</sup> and *Pbat*2, and power demand from the loads are *Pload*<sup>1</sup> and *Pload*2, respectively.

$$P\_{MG} = P\_1 + P\_2.\tag{9}$$

The total sum of active power for microgrid 1 and microgrid 2 is denoted by *PMG*. When the power grid is involved in the energy exchange, the supplied power denoted by *P*<sup>0</sup> is:

$$P\_0 = -P\_{MG}.\tag{10}$$

Based on the above analysis, seven operational states can be summarized for the energy router, as shown in Table 3. The related state-transition diagram is demonstrated in Figure 6.


**Table 3.** All the states of the energy router.

**Figure 6.** State-transition diagram of the energy router.

#### **5. Dual-Loop Feedback Control**

#### *5.1. Inner Loop Controller*

Based on Kirchhoff's law, the voltage equation of VSC0 in the synchronous *dq* coordinate system can be derived, and the items coupling between the *d* and *q* axes can be removed by the decoupling feed forward control method. Assuming that the energy router operates in case 3 (in Figure 3c), the voltage control equations of the VSC*i* inner-loop controller can be written as:

$$\begin{cases} \ v\_{d0} = -\left(K\_{P0} + \frac{K\_{l0}}{s}\right)(i\_{0dref} - i\_{d0}) + \omega\_0 L\_{\Sigma} i\_{q0} + \frac{1}{k} e\_{d0} \\\ v\_{q0} = -\left(K\_{P0} + \frac{K\_{l0}}{s}\right)(i\_{0qref} - i\_{q0}) - \omega\_0 L\_{\Sigma} i\_{d0} + \frac{1}{k} e\_{q0} \end{cases} \tag{11}$$

where *KPi* and *KIi* are the proportional and integral regulation gain in the inner loop, respectively. Similarly, the voltage equation of VSC1 working in the inverter status can be written as:

$$\begin{cases} \boldsymbol{\upsilon}\_{d1} = (\boldsymbol{K}\_{P1} + \frac{\boldsymbol{K}\_{\text{II}}}{s})(\boldsymbol{i}\_{1dref} - \boldsymbol{i}\_{d1}) - \omega\_{1}L\_{1}\boldsymbol{i}\_{q1} + \boldsymbol{\varepsilon}\_{d1} \\\ \boldsymbol{\upsilon}\_{q1} = (\boldsymbol{K}\_{P1} + \frac{\boldsymbol{K}\_{\text{II}}}{s})(\boldsymbol{i}\_{1qref} - \boldsymbol{i}\_{q1}) + \omega\_{1}L\_{1}\boldsymbol{i}\_{d1} + \boldsymbol{\varepsilon}\_{q1} \end{cases} \tag{12}$$

while the voltage equation of VSC2 working in the rectifier status can also be derived as:

$$\begin{cases} \ v\_{d2} = -\left(K\_{P2} + \frac{K\_{d2}}{s}\right) (i\_{2dref} - i\_{d2}) + \omega\_2 L\_2 i\_{q2} + e\_{d2} \\\ v\_{q2} = -\left(K\_{P2} + \frac{K\_{d2}}{s}\right) (i\_{2qref} - i\_{q2}) - \omega\_2 L\_2 i\_{d2} + e\_{q2} \end{cases} \tag{13}$$

#### *5.2. Outer-Loop Controller*

The outer-loop is used to generate the inner-loop current reference signal and input to the inner-loop control. According to different control objectives, the outer-loop controller can be classified as active/reactive power controller or DC voltage controller.

#### 5.2.1. Active/Reactive Power Controller

The active/reactive power controller is used to keep the VSC working such that its active/reactive power output on the AC side shall follow the reference command value issued by the microgrid controller, with zero steady-state error. Classical proportional-integral (PI) regulators are used in the outer-loop control to calculate the current commands to the inner-loop with the power deviations.

Define the power direction symbol function sgn as:

$$\text{sign} = \begin{cases} +1 \text{ power out AC system} \\ -1 \text{ power in AC system} \end{cases} \text{.} \tag{14}$$

The *d*-axis is in the same direction to the voltage vector, which leads to *eqi* = 0. The active power *Pi* and reactive power *Qi*, absorbed from the AC system to VSC*i*, can be expressed as:

$$\begin{cases} \begin{array}{c} P\_i = \mathcal{e}\_{di} i\_{di} \times \text{sgn} \\ Q\_i = -\mathcal{e}\_{di} i\_{qi} \times \text{sgn} \end{array} . \end{cases} \tag{15}$$

According to Equation (15), the control between active power and reactive power can be decoupled. Then, *Pi* and *Qi* are compared with their reference inputs *Piref* and *Qiref*, respectively, and the result of the comparison is used by the PI controller to calculate the current command value. The control structure of the active power controller is shown in Figure 7.

**Figure 7.** Control structure of the active power controller.

As a matter of fact, when the AC systems are injected with excessive power, the corresponding AC voltage *ei* will rise. Conversely, the corresponding AC voltage will decline when the AC systems lack power energy. Hence, compared to the ordinary zero steady-state error tracking control, AC voltage-limiting controllers are added so that the internal stability of the AC systems can be maintained.

The purpose of the AC voltage-limiting controller is to keep the amplitude of AC voltage within a set range. When *ei* exceeds the upper-limit value *Ei*max, the AC voltage-limiting controller outputs a negative value, which serves as the disturbance quantity and adds to the *Qiref*. Thereby, the inner-loop current command value *iiqref* decreases, so that the absorbed power in the AC system can be reduced. On the other hand, when *ei* exceeds the lower-limit value *Ei*min, the AC voltage-limiting controller outputs a positive value and adds to the *Qiref*. Thus, the inner-loop current command value *iiqref* increases, so that the absorbed power in the AC system can be augmented. The control structure of reactive power control within the AC voltage controller is shown in Figure 8.

**Figure 8.** Control structures of reactive power controller.

#### 5.2.2. DC Voltage Controller

The DC voltage controller is responsible for keeping the DC-link voltage within an adequate range around the command value issued by the microgrid controller. For VSC*i* (*i* = 1, 2) controlled by the DC voltage controller, the active power *Pi* exchanged with the AC systems is identical to the DC power *Pdc* stored in *Cdc*.

$$P\_{dc} = \frac{1}{2} \mathbb{C}\_{dc} \frac{d u\_{dc}^2}{dt} = \sum\_{i=1,2,3} P\_i. \tag{16}$$

The current command input to the *d*-axis of the inner-loop current controller is

$$i\_{idrcf} = \left(K\_{Pdc} + \frac{K\_{Idc}}{s}\right) \left(u\_{dcrcf}^2 - u\_{dc}^2\right),\tag{17}$$

where *KPdc* and *KIdc* are the proportional and integral regulation gains, respectively. Under this controller, the *d*-axis current command is derived from Equation (17), and the control structure is shown in Figure 9. Meanwhile, the *q*-axis current command is derived from Equation (15), while the control structure is shown in Figure 8.

**Figure 9.** Control structure of the DC voltage controller.

#### **6. Simulation Studies**

The simulation model of the interconnected microgrid system was built on the MATLAB R2014b/Simulink platform. The simulation model of the overall system and the sub-models of VSC0 and its controller are demonstrated in Figure 10a–c, respectively. Apart from the transformer, the simulation models of VSC1, VSC2 and their controllers are similar to VSC0.

**Figure 10.** Simulation model of the interconnected microgrid system in MATLAB R2014b/Simulink platform: (**a**) overall simulation model; (**b**) VSC0 simulation model; and (**c**) VSC controller simulation model.

In this section, four simulation scenarios are presented to investigate the dynamic characteristics of the interconnected microgrids in all the operation modes defined previously, and to verify the feasibility of the proposed control strategies. The transient responses of the energy router for operational-mode shifting of the microgrids, the power balancing in Parallel Mode and the suppression of AC voltage disturbances are all demonstrated by these four simulated scenarios. The simulation parameters are listed in Table 4.


**Table 4.** Simulation parameters.

#### *6.1. Scenario 1*

In this paper, a new operational mode—the Parallel Mode—is defined for the interconnected microgrids. Microgrid 2 does not need to have any energy exchange with the power grid, because its power deficit can be met by the surplus power of the adjacent microgrid 1. In this scenario, both microgrid 1 and microgrid 2 are operating in the parallel mode, which the energy router is operating in case 4. Microgrid 1 is supplying its surplus energy to microgrid 2, so VSC1 is the master converter and VSC2 is the slave converter. The detail of the power flow from microgrid 1 to microgrid 2 and the DC-link voltage variation of the transient process are demonstrated in Figure 11.

**Figure 11.** Simulation results of scenario 1: (**a**) active power curves; (**b**) reactive power curves; (**c**) DC-link voltage curves; and (**d**) frequency curves.

(1) The process of active power flow within the interconnected microgrids is as follows:

*t* = 0 s, 50 kW active power is provided to microgrid 2 by microgrid 1; *t* = 1 s, the active power transfer from VSC1 to VSC2 increases from 50 to 80 kW; *t* = 2 s, the command value of the active power transfer changes from 80 to 60 kW. The active power variations of the VSCs and the command value curves are shown in Figure 11a.

(2) The reactive power flow between the interconnected microgrids is as follows:

*t* = 0 s, 15 kVar reactive power is provided to microgrid 2 by microgrid 1; *t* = 1 s, the absorbed reactive power command value changes from 15 to 25 kVar; *t* = 2 s, the reactive power transfer changes from 25 to 20 kVar. The reactive power variations of the VSCs and the command value curves are shown in Figure 11b.

As demonstrated in Figure 11a,b, when the power transfer command value changes abruptly at *t* = 1 s and *t* = 2 s, there are only slight fluctuations in the output power curves, and the stable state is restored quickly. The active and reactive power transfer of VSC0 remains zero as the main grid is not involved in any power transfer through the energy router. As is shown in Figure 11c, the fluctuation range of the DC-link voltage is minor and can be ignored. Figure 11d shows that frequency fluctuates in an acceptable range for both microgrid 1 and microgrid 2 at the moments that energy exchange occurs. However, due to the electrical isolation of the energy router, the fluctuation does not have an impact on the frequency of the power grid, which remains stable at 50 Hz during the whole process. Note that the DC-link voltage is an indicator of instant power balance; the simulation results in Figure 11 have clearly verified the effectiveness of the control strategies in this scenario.

#### *6.2. Scenario 2*

This scenario demonstrates the dynamic characteristics of the interconnected microgrids during the transition process from the situation of case 1 (shown in Figure 3a) to case 2 (in Figure 3b), during which microgrid 1 switches from grid-connected mode to islanded mode, while microgrid 2 remains grid connected. The variations in power flow and AC frequency, as well as the DC-link voltage during the whole process, are demonstrated in Figure 12.

**Figure 12.** Simulation results of scenario 2: (**a**) active power curves; (**b**) reactive power curves; (**c**) DC-link voltage curves; and (**d**) frequency curves.

• *t* = 0–1 s

The energy router is working under the situation of case 1 (shown in Figure 3a). Both microgrid 1 and microgrid 2 are operating in the grid-connected mode, during which VSC0 serves as the master converter while VSC1 and VSC2 work as slave converters. During this period, the active power transferred from VSC0 to both VSC1 and VSC2 is 60 and 40 kW, respectively, and the reactive power transferred to VSC1 and VSC2 is 20 and 15 kVar, respectively.

$$\mathbf{\bullet} \qquad t = 1 \text{--} 2 \text{ s}$$

The operational situation of the energy router switches to case 2 (shown in Figure 3b). During this period, the operational mode of microgrid 1 is changed from grid-connected to islanded, and VSC1 is not involved in any energy-exchange process. Meanwhile, the operational mode of microgrid 2 remains unchanged, with VSC0 serving as the master converter and VSC2 working as the slave converter. The active and reactive power transferred from the power grid to microgrid 2 remains unchanged.

• *t* = 2–3 s

In this period, the energy router is operating in the situation of case 2 (shown in Figure 3b), and the active power and reactive power imported from the power grid to microgrid 2 increases to 60 kW and 20 kVar, respectively.

As is shown in Figure 12a,b, the active and reactive power flows can track their command value accurately and rapidly after a small fluctuation. Instant power balance between the power grid and the interconnected microgrids is guaranteed in this case, which has verified the effectiveness of the presented control strategies. The active and reactive power transfer from VSC1 remains zero when microgrid 1 is not involved in the energy exchange. Shown in Figure 12c, the fluctuation range of the DC-link voltage at the moments of power transfer is minor and can be ignored. As for the frequency curves shown the Figure 12d, it can be seen that the frequencies of the power grid and microgrid 2 appear to be fluctuant at the moments that power exchange occurs. However, there is no frequency fluctuation of microgrid 1 at *t* = 2 s, since that microgrid was not involved in the energy exchange at that moment. The simulation results in Figure 12 have clearly verified the effectiveness of the control strategies in this scenario. Meanwhile, the feasibility of the control scheme in the island mode can also be verified.

#### *6.3. Scenario 3*

The microgrid with surplus power production (microgrid 2 in this scenario) may change from grid-connected to parallel mode, while the energy router needs to shift to the situation of case 3. In this scenario, operation of the energy router is switched from the situation of case 1 (shown in Figure 3a) to case 3 (in Figure 3c).The power flow from microgrid 1 to microgrid 2, the DC-link voltage and the AC frequency variations during the whole process are demonstrated in Figure 13.

**Figure 13.** Simulation results of scenario 3: (**a**) active power curves; (**b**) reactive power curves; (**c**) DC-link voltage curves; and (**d**) frequency curves.

At *t* = 1 s, the status of microgrid 2 changes from energy consumption to energy production. Along with the power grid as energy provider, microgrid 2 transfers 20 kW active power and 5 kVar reactive power to microgrid 1. The situation of curve variations in Figure 13 is similar to that in Figure 12.

#### *6.4. Scenario 4*

In this scenario, the characteristics of the microgrids are investigated when a disturbance occurs on the grid side. While the energy router is operating in the situation of case 1, it is assumed that voltage variation occurs on the power-grid side.

As shown in Figure 14, the disturbance on the grid side starts from *t* = 0.2 s and continues for the next 0.1 s. The amplitude of the grid voltage decreases by 5%, due to the disturbance. The variations in active/reactive power, DC-link voltage and AC frequency on the microgrid side during the process are shown in Figure 15.

**Figure 14.** Three-phase voltage curves on the grid side at the moment of disturbance.

**Figure 15.** Simulation results of scenario 4: (**a**) active power curves; (**b**) reactive power curves; (**c**) DC-link voltage curves; and (**d**) frequency curves.

When the disturbance occurs at *t* = 0.2 s, the power supplied from the power grid fluctuates within a narrow range. The DC-link voltage also fluctuates along with it, but recovers from the disturbance rapidly. More importantly, due to the electrical isolation functionalities of the energy router, the AC frequency and voltage on the microgrid side are not affected by the disturbance, as shown in Figure 15d.
