5.1 Introduction

As an important distribution center for ship berthing, the smooth access of ships to shore power (cold ironing) affects the stable operation of the port microgrid. Ship shore power technology uses shore power instead of ship auxiliary machinery to provide all the electricity needed during the ship’s stay in the port, thereby controlling air pollution in the port area [1, 2]. The ship shore power integrated power supply system operates in an asynchronous interconnection manner with multiple terminal power sources. Therefore, the grid connection process between the ship’s power grid and shore power could bring significant power fluctuations, which may affect the normal operation of electrical equipment on both sides of the ship and even damage the equipment, leading to grid connection failure, posing great challenges to the safe, reliable, and economical operation of the port microgrid [3,4,5,6].

The flexible interconnection of the port microgrid and ship microgrid, using flexible multi-state switches (FMS), provides a new approach for safe, reliable, and fast grid connection and disconnection of ships. On one hand, the port microgrid itself, using flexible control technology, can optimize the distribution and balance of energy to a certain extent, enabling bidirectional power flow with the ship microgrid [7]. On the other hand, the FMS, as a fully controllable device with a back-to-back structure, can achieve real-time regulation of the voltage phase angle for grid connection and disconnection, enhancing the operability of ship access. Additionally, the application of FMS improves the charging and discharging capabilities and power balance of the port-ship interconnected microgrid, further enhancing the coordination and interaction between ships and the port microgrid, enabling reliable access for different types of ships, especially electric ships. This technology has already been applied in coastal ports in the East China Sea.

The coordinated control of FMS is crucial for improving the operational performance of the port microgrid. During transient fluctuations or shocks [8], it is necessary to explore the coordinated control between FMS and the port-ship interconnected microgrid to ensure smooth switching and continuous stable operation of ship access to shore power. FMS is an important link for ship access to shore power and power exchange [9,10,11,12,13], and the transient process is influenced by both. When the ship microgrid and the port microgrid are interconnected, the operating mode of FMS needs to be urgently switched. Considering the transient impact of the connection time on the system, FMS should switch from P-Q control to Uac-f control in the shortest possible time, providing stable and continuous voltage and frequency support for the ship microgrid to achieve load transfer [14].

The detection and communication delays are involved in the emergency mode switching process, which affects the frequency, voltage stability, and FMS control switching [15,16,17]. During the delay, FMS remains in the P-Q mode. If there is an imbalance between the power supply and load, it can cause significant changes in frequency and voltage [15]. Due to the impact of the switching delay, the reference phase of FMS control switching may experience sudden changes, causing significant frequency shocks. Additionally, the output signal of FMS control undergoes sudden changes before and after the delay, causing significant voltage shocks. The aforementioned switching fluctuations and shocks can lead to the failure of ship access to shore power and, in severe cases, even system instability. Therefore, smooth control of the mode switching process becomes a key technical challenge for the flexible interconnection of the port microgrid and ship microgrid.

Traditional islanding/grid-connected mode switching has been extensively studied [18,19,20,21]. The most commonly used switching method is parallel computation of output signals and direct switching using P-Q control and Uac-f control methods [22]. However, switching delays can cause abrupt changes in the output signal. Estimating and setting the initial values of control after switching in advance [23] ignores the impact of load fluctuations on the initial values. As the penetration rate of distributed generation (DG) increases, the deviation of the initial values will be larger. Therefore, the above method is more suitable for scenarios where the source-load power is relatively stable. Phase-locked loop control [24], initial phase angle [25], and pre-synchronization control [26] can reduce the impact caused by FMS mode switching, but due to the limitations of controller response speed, there are still deviations in actual scenarios. Existing inverter control methods mostly solve the problem of output signal mutation, but it is difficult to simultaneously consider the voltage and frequency fluctuations and impacts caused by source-load imbalance during islanding/grid-connected mode switching.

In order to address the issues of switching delay, initial phase angle, and the impact caused by control mode switching in FMS, this chapter proposes a smooth control strategy for port-ship islanding/grid-connected mode switching. The frequency and voltage variations in the microgrid during the switching delay are analyzed, and an adaptive droop coefficient control method is proposed to prevent frequency and voltage violations. A smooth switching method, which includes coordinated phase compensation, coordinated control switching, and pre-synchronization, is proposed to mitigate the instantaneous impact during the switching process. A port-ship islanding/grid-connected simulation model is established based on PSCAD/EMTDC to validate the effectiveness of the proposed strategy.

5.2 Flexible Interconnected Port-Ship Microgrid and Operation Mode Based on FMS

5.2.1 Flexible Interconnected Port-Ship Microgrid Based on FMS

The flexible interconnected microgrid based on FMS combines the control advantages of FMS and microgrid, greatly improving the cluster access of DG, the scale consumption capacity, and the steady-state operation efficiency of the new distribution network. As shown in Fig. 5.1, the flexible interconnected microgrid based on FMS consists of back-to-back converters, with MMC1 and MMC2 representing the two-side converters of FMS, C0 representing the common DC capacitor, AC1 and AC2 representing the power supply of the two ends of FMS, K representing the circuit breaker switch, solid lines representing power flow, and dotted lines representing information communication. As shown in Fig. 5.1a, the normal flexible “soft connection” between the distribution network feeders is realized to achieve microgrid interconnection and grid connection. The intelligent distribution system sets the power reference value according to the feeder current distribution and power quality, and the system operates normally. K1 and K2 are closed, and power exchange between the microgrids on both sides of FMS can be realized. As shown in Fig. 5.1b, if the upper-level power grid on one side of FMS is abnormal or power failure occurs due to a fault, the intelligent distribution system sends a switching command to FMS. Taking MMC1 side as an example, K1 is opened, and FMS switches to Uac-f control mode to provide voltage and frequency support to the microgrid at PCC1, realizing uninterrupted power supply and safe and stable operation of distributed power sources.

Fig. 5.1
figure 1

Interconnected microgrids via FMS

5.2.2 Operation Modes of the Flexible Interconnected Port-Ship Microgrid

The two operating modes of the classified microgrid are shown in Table 5.1. In the power regulation mode, FMS adopts the P-Q control mode, and outputs active power and reactive power according to the reference command of the intelligent distribution system. The ESS can use droop control to adjust the microgrid frequency and voltage in real-time. In the emergency control mode, FMS adopts the Uac-f control mode to keep the microgrid voltage and frequency unchanged. The ESS still uses droop control to mitigate the impact during the switching process.

Table 5.1 Operating modes of interconnected microgrids via FMS

5.2.3 Emergency Switching of Flexible Interconnected Ship-Port Microgrid

As shown in Fig. 5.2, when a fault occurs, the microgrid mode is switched from power regulation mode to emergency control mode. However, switching delay occurs due to factors such as detection, research and judgment delay and communication delay. In this delay stage, the voltage of PCC node loses power grid voltage clamping. When the microgrid source and load imbalance is large, it is easy to cause voltage and frequency exceeding limits, threatening the safe and stable operation of the microgrid. This process is a transition state. The ESS still uses droop control to effectively mitigate the voltage and frequency fluctuations within the FMS switching delay. When the fault is recovered, the microgrid mode is switched from the emergency control mode to the power regulation mode. Due to frequency fluctuation during the switching process, there is a phase difference between the power supply phase angle of the grid and the microgrid PCC phase angle, causing a momentary impact during grid connection.

Fig. 5.2
figure 2

Emergency switching process of interconnected ship-port microgrids

In addition to the voltage and frequency fluctuations within the switching delay, there will also be significant impacts during the emergency mode switching. Firstly, because the Uac-f control mode cannot lock the phase of the grid power source, an initial reference phase needs to be set. Due to the switching delay and changes in network topology, the reference phase setting may experience a sudden change during the switching process, causing significant frequency impact. Secondly, the sudden change in control mode will cause transient adjustment of the converter control switching process, further causing a sudden change in the PWM output signal during the switching moment, causing significant voltage impact. The switching impact described above will cause significant voltage and frequency fluctuations at the PCC of the microgrid connected to FMS. How to effectively mitigate the above fluctuations and impacts is the key to achieving smooth switching.

5.3 Emergency Mode Switching Control Strategy for Interconnected Port-Ship Microgrid

5.3.1 Mode Emergency Switching

A control strategy for smoothing mode switching was proposed to minimize fluctuations and mitigate the impact of emergency mode transitions. Figure 5.3 illustrates the stage of emergency mode switching. During normal operation, the flexible interconnected microgrid operates in power regulation mode. MMC1 in the FMS utilizes the P-Q control mode to facilitate accurate power exchange among microgrids, while MMC2 adopts the Udc-Q control mode to maintain voltage stability of the DC bus and ensure power balance throughout the entire system. The ESS is controlled using droop control. In the event of a fault, the FMS receives an instruction for emergency mode switching from the intelligent power distribution system, which is subject to a time delay (t2t3). The FMS changes its mode switching control mode at the moment of switching (t3). As depicted in Fig. 5.4, the FMS transitions from the P-Q control mode to the Uac-f control mode, while the ESS collaboratively handles voltage and frequency fluctuations in the microgrid. Once the fault is resolved (t4), the FMS receives a pre-synchronization instruction, which primarily considers phase angle changes and utilizes pre-synchronization to approximate the phase angle of the grid. After achieving the grid-connection condition, the FMS switches the control mode at t5.

Fig. 5.3
figure 3

Process of emergency switching of the interconnected port microgrids via FMS

Fig. 5.4
figure 4

Operation mode switching of FMS

5.3.1.1 Mode Control Strategy for Emergency Switching

  1. (1)

    Adaptive droop control

The ESS employs droop control to mitigate frequency and voltage fluctuations in the power grid, as described by control equation (5.1):

$$\begin{array}{*{20}c} {\left\{ {\begin{array}{*{20}c} {P_{ESS} = \frac{{f_{0} - f_{pcc} }}{m} + P_{0} } \\ {Q_{ESS} = \frac{{U_{0} - U_{pcc} }}{n} + Q_{0} } \\ \end{array} } \right.} \\ \end{array}$$
(5.1)

where PESS and QESS are ESS output active power and reactive power respectively, P0 and Q0 are ESS active power and reactive power ratings respectively, Upcc and fpcc are voltage and frequency of PCC respectively, U0 and f0 are rated voltage and frequency respectively, m and n are droop coefficient.

As shown in Fig. 5.5, during normal system operation, K1 is closed, and the system operates in power regulation mode, where the grid power stabilizes the voltage and frequency of the system. FMS and DG operate in a P-Q control mode, effectively acting as a current source characteristic power supply. The ESS utilizes droop control to regulate the voltage and frequency of the system, effectively acting as a controlled voltage source characteristic power supply. The AC load is equivalently represented as a constant impedance load. Based on the power flow relationship at the point of common coupling (PCC), we can derive the following equation:

$$\begin{array}{*{20}c} {\left\{ {\begin{array}{*{20}c} {P_{load} = P_{FMS} + P_{DG} + P_{ESS} + P_{s} = \frac{{U_{pcc}^{2} }}{R}} \\ {Q_{load} = Q_{FMS} + Q_{DG} + Q_{ESS} + Q_{s} = \left( {\frac{1}{{2\pi f_{pcc} L}} - 2\pi f_{pcc} C} \right)U_{pcc}^{2} } \\ \end{array} } \right.} \\ \end{array}$$
(5.2)

where PFMS and QFMS respectively represent the active and reactive power output of FMS, Pload and Qload respectively represent active and reactive load, PDG and QDG respectively represent the active and reactive power output of DG, Ps and Qs represent the active and reactive power of the grid. R, L and C are load equivalent inductance, resistance and capacitance, respectively.

As shown in Fig. 5.6, within the switching delay, K1 is opened, and the system enters a transitional state. Under P-Q control, DG and FMS still act as current source characteristic power supplies. The load power varies with PCC voltage and system frequency. Similarly, we can obtain the following relationship:

$$\begin{array}{*{20}c} {\left\{ {\begin{array}{*{20}c} {P_{load}^{\prime} = P_{FMS} + P_{DG} + P_{ESS}^{\prime} = \frac{{U_{pcc}^{{\prime}2} }}{R}} \\ {Q_{load}^{\prime} = Q_{FMS} + Q_{DG} + Q_{ESS}^{\prime} = \left( {\frac{1}{{2\pi f_{pcc}^{\prime} L}} - 2\pi f_{pcc}^{\prime} C} \right)U_{pcc}^{{\prime}2} } \\ \end{array} } \right.} \\ \end{array}$$
(5.3)

where, \(P^{\prime}_{{{\text{load}}}}\) and \(Q^{\prime}_{{{\text{load}}}}\) are active load and reactive load after fault, \(P^{\prime}_{{{\text{ESS}}}}\) and \(Q^{\prime}_{{{\text{ESS}}}}\) are active load and reactive load after fault, \(f^{\prime}_{{{\text{pcc}}}}\) and \(U^{\prime}_{{{\text{pcc}}}}\) are PCC frequency and voltage after fault respectively.

Fig. 5.5
figure 5

Equivalent circuit of microgrid under power regulation mode

Fig. 5.6
figure 6

Equivalent circuit of port microgrid under transition state

In combination with (5.2) and (5.3), we can obtain:

$$\begin{array}{*{20}c} {\left\{ {\begin{array}{*{20}c} {f_{pcc}^{\prime} = m\left( {\frac{{U_{pcc}^{2} - U_{pcc}^{{\prime}2} }}{R} - P_{s} } \right) + f_{pcc} } \\ {\frac{{U_{pcc}^{\prime} - U_{pcc} }}{R} + Q_{s} = \frac{1}{2\pi L}\left( {\frac{{U_{pcc}^{2} }}{{f_{pcc} }} - \frac{{U_{pcc}^{{\prime}2} }}{{f_{pcc}^{\prime} + c}}} \right) - 2\pi C\left( {U_{pcc}^{2} f_{pcc} - U_{pcc}^{{\prime}2} f_{pcc}^{\prime} } \right)} \\ \end{array} } \right.} \\ \end{array}$$
(5.4)

From Eq. (5.4), we can determine the voltage and frequency fluctuations within the switching delay of the microgrid and their relationship to the power loss when the feeder line loses grid power after a fault. Grid-connected inverters should possess anti-islanding functionality, which means that the voltage and frequency variations during the switching delay must stay outside the triggering range of the anti-islanding device. Under the assumption that the communication system is not faulty, this delay is generally kept below 2 s. Setting voltage and frequency operating range parameters can be done based on other standards to ensure that distributed energy sources remain connected during the microgrid’s emergency mode switching process:

$$\begin{array}{*{20}c} {\left\{ {\begin{array}{*{20}c} {aU_{{{\text{pcc}}}} < U_{{{\text{pcc}}}}^{\prime} < bU_{{{\text{pcc}}}} } \\ {f_{{{\text{pcc}}}} + c < f_{{{\text{pcc}}}}^{\prime} < f_{{{\text{pcc}}}} + d} \\ \end{array} } \right.} \\ \end{array}$$
(5.5)

where a, b, c, d are constants, a < 1, b > 1, c < 0, d > 0.

By solving Eqs. (5.4) and (5.5) simultaneously, we obtain the range of droop coefficients that ensures the anti-islanding device does not malfunction:

$$\left\{ {\begin{array}{*{20}c} {m \in \left[ {\frac{\lambda cR}{{\left( {1 - b^{2} } \right)U_{pcc}^{2} - P_{s} R}},\frac{dR}{{\left( {1 - b^{2} } \right)U_{pcc}^{2} - P_{s} R}}} \right]} \\ {n \in \left[ {\frac{{\left( {a - 1} \right)U_{pcc} }}{{\frac{1}{2\pi L}\left( {\frac{{U_{pcc}^{2} }}{{f_{pcc} }} - \frac{{b^{2} U_{pcc}^{2} }}{{f_{pcc} + c}}} \right) - 2\pi C\left[ {U_{pcc}^{2} f_{pcc} - b^{2} U_{pcc}^{2} \left( {f_{pcc} + d} \right)} \right] - Q_{S} }} \cdots } \right.,} \\ {\left. {\frac{{\left( {b - 1} \right)U_{pcc} }}{{\frac{1}{2\pi L}\left( {\frac{{U_{pcc}^{2} }}{{f_{pcc} }} - \frac{{a^{2} U_{pcc}^{2} }}{{f_{pcc} + d}}} \right) - 2\pi C\left[ {U_{pcc}^{2} f_{pcc} - a^{2} U_{pcc}^{2} \left( {f_{pcc} + c} \right)} \right] - Q_{S} }}} \right]} \\ \end{array} } \right.$$
(5.6)

Microgrid voltage frequency is rated value during normal operation, Upcc = U0, fpcc = f0.

When a fault occurs, the grid power abruptly drops to zero. In order to quickly compensate for the power imbalance and accelerate the response speed, a smaller value for the droop coefficient should be chosen. This corresponds to selecting the minimum value boundary in Eq. (5.6). However, considering that the boundary values of the droop coefficient may affect the reliability of the switching process, a margin factor λ is introduced to enhance its reliability, namely:

$$\begin{array}{*{20}c} {\left\{ {\begin{array}{*{20}c} {m = \frac{\lambda cR}{{\left( {1 - b^{2} } \right)U_{pcc}^{2} - P_{s} R}}} \\ {n = \frac{{\lambda \left( {a - 1} \right)U_{pcc} }}{{\frac{1}{2\pi L}\left( {\frac{{U_{pcc}^{2} }}{{f_{pcc} }} - \frac{{b^{2} U_{pcc}^{2} }}{{f_{pcc} + c}}} \right) - 2\pi C\left[ {U_{pcc}^{2} f_{pcc} - b^{2} U_{pcc}^{2} \left( {f_{pcc} + d} \right)} \right] - Q_{S} }}} \\ \end{array} } \right.} \\ \end{array}$$
(5.7)
  1. (2)

    Collaborative smooth switching method

  1. 1.

    Collaborative phase angle compensation

At time t3, FMS’s MMC2 continues to utilize Udc-Q control, while MMC1 switches to Uac-f control. Since both FMS modeling and control are implemented in the dq coordinate system, and the abc/dq and dq/abc transformations require a reference phase, the absence of grid power after the PCC switch opens prevents obtaining synchronized phase information through a PLL. Therefore, it is necessary to manually provide the reference phase for the controller. During grid-connected operation, the phase of MMC1 is dependent on the grid phase. Considering the phase angle variation during the switching delay, a direct switch may cause significant impacts. Hence, compensation for the phase angle difference is required. In other words:

$$\begin{array}{*{20}c} {\theta^{\prime} = 2\pi f_{0} t + \theta_{0} } \\ \end{array}$$
(5.8)

where θ′ sets phase angle for Uac-f control; θ0 is the phase angle at the control switching moment.

The ESS collaborates with FMS for phase angle compensation. When a deviation occurs between the manually set reference phase angle and the actual phase angle, it results in a sudden change in microgrid frequency. The ESS quickly responds by generating or absorbing active power to restore the frequency, thereby reducing momentary impacts. This is expressed in Eq. (5.9).

$$\begin{array}{*{20}c} {\left\{ {\begin{array}{*{20}c} {\frac{d\Delta \theta }{{dt}} = {2}\pi \left( {f_{{{\text{pcc}}}}^{\prime} - f_{{{\text{pcc}}}} } \right) = {2}\pi \Delta f_{{{\text{pcc}}}} } \\ {\Delta f_{{{\text{pcc}}}} = - m\Delta P_{{{\text{ESS}}}} } \\ \end{array} } \right.} \\ \end{array}$$
(5.9)
  1. 2.

    Collaborative control switching

Prior to the mode switching, the current loop’s PI controller has reached a steady state, and the output signal is at a steady value. However, after the switching, the current PI controller needs to gradually adjust from a zero state to reach a steady state. This adjustment process takes a certain amount of time, resulting in a control switching impact. To accelerate the FMS control switching and adjustment speed, the steady-state operating point (5.10) is calculated using the steady-state inverse model. Based on the imbalance between source and load in the disrupted feeder line, the required power ΔP and ΔQ for FMS are determined. Combining this with the voltage reference value, the operating point is computed to provide command values for the current inner loop, thereby reducing the adjustment time.

$$\begin{array}{*{20}c} {\left\{ {\begin{array}{*{20}c} {i_{d} = \frac{2}{3}\frac{{U_{d}^{*} \Delta P + U_{q}^{*} \Delta Q}}{{U_{d}^{*2} + U_{q}^{*2} }}} \\ {i_{q} = \frac{2}{3}\frac{{U_{q}^{*} \Delta P - U_{d}^{*} \Delta Q}}{{U_{d}^{*2} + U_{q}^{*2} }}} \\ \end{array} } \right.} \\ \end{array}$$
(5.10)

The control switching between the ESS and FMS results in a switching impact ΔU due to the sudden change in the control output signal. This can cause a voltage variation ΔUpcc in the microgrid. To mitigate this, the ESS quickly responds by generating or absorbing reactive power ΔQpcc to restore the voltage, thereby reducing momentary impacts. This relationship is illustrated in Eq. (5.11).

$$\begin{array}{*{20}c} {\left\{ {\begin{array}{*{20}c} {\Delta U_{{{\text{pcc}}}} = \Delta U + \left( {i_{2} - i_{1} } \right)\left[ {R_{T} + j\left( {L_{T} + \frac{{L_{0} }}{2}} \right)} \right]} \\ {\Delta U_{{{\text{pcc}}}} = - n\Delta Q_{{{\text{ESS}}}} } \\ \end{array} } \right.} \\ \end{array}$$
(5.11)

where i1 is the output current of the converter before switching, i2 is the output current of the converter after switching, L0 is the inductance of the bridge arm, and RT and LT are the equivalent inductance and resistance of the connecting line and transformer respectively.

  1. 3.

    Pre-synchronization

When the grid needs to be restored after a disruption, there is a phase difference between the grid power phase angle and the faulted feeder line phase angle due to frequency fluctuations during the control process. To avoid the instantaneous impact caused by the phase difference during grid connection, a phase pre-synchronization strategy is employed to gradually align the feeder line phase angle with the grid phase angle. Once the phase angle difference falls within the allowable range for grid connection, the system resumes grid operation. The phase angle control equation is as follows:

$$\begin{array}{*{20}c} {\theta^{\prime} = \bmod \left( {\int {\left( {2\pi f_{pcc}^{\prime} + k_{p} \left( {\theta_{g} - \theta_{l} } \right) + k_{i} \int {\left( {\theta_{g} - \theta_{l} } \right)} dt} \right)} dt,2\pi } \right)} \\ \end{array}$$
(5.12)

where θg is the phase angle of power supply in the grid, θl is the phase angle of planned grid connection, and mod is the complementary function.

5.3.2 Flow of Smooth Control for Emergency Switching of Operation Modes

The flowchart in Fig. 5.7 illustrates the process of smooth control for mode emergency switching. In the absence of faults, the real-time monitoring of grid power transmission is conducted based on the current operational state. The droop coefficient is adaptively adjusted according to Eq. (5.7). When a fault occurs, FMS receives a mode emergency switching signal from the intelligent power distribution system and switches to Uac-f control mode. ESS collaborates to mitigate the switching impact. After the fault is resolved, FMS receives a pre-synchronization signal to adjust the phase angle. Once the grid connection conditions are met, the switches are closed, and FMS switches to P-Q control mode.

Fig. 5.7
figure 7

Smooth control for emergency switching of operation modes

5.4 Simulations

The operational scenario of the flexible inter-connected microgrid, as shown in Fig. 5.1, was constructed in PSCAD/EMTDC. The simulation was set up as follows: the system operates normally from 0 to 1.8 s, at 1.8 s, a fault occurs in the 10 kV feeder line, and at 2 s, the grid PCC switch opens, triggering the control mode switching by FMS after the switching delay. At 5 s, the system resumes grid operation. The source-load ratio is defined as the ratio of the active power between the DG and the load. Taking the parameters of a university energy network as an example, the specific parameters are listed in Table 5.2.

Table 5.2 Parameters of examples and test

According to Fig. 5.7, considering a safety margin factor λ = 1.1 and referring to IEEE Std. 2000.929 [27] Sect. 5.3, which specifies the operating frequency range of the distributed power system as 59.3–60.5 Hz, the following parameters are designed: c = −0.7 Hz and d = 0.5 Hz. Referring to the voltage disturbance requirements in Sect. 5.1.1 of IEEE Std. 2000.929, the PCC operating voltage can range from 88 to 137%. Based on this, the parameters a = 0.88 and b = 1.37 are selected. The active power droop coefficient for ESS is calculated as 0.82 Hz/MW, and the reactive power droop coefficient is 6.3 kV/MVar. In the power regulation mode, the FMS output power is set to 0.05 MW for active power and 0 MVar for reactive power. Different scenarios with varying switching delays and source-load ratios are shown in Table 5.3. Simulation results are obtained to compare the switching effects between the proposed mode switching smoothing control strategy and the hard switching of the microgrid mode without smoothing control.

Table 5.3 Simulation scenarios
  1. (1)

    Scenario 1

As shown in Fig. 5.8, at 1.8 s, a fault occurs, resulting in a rapid voltage drop in the microgrid. The FMS power transmission becomes unstable. At 2 s, the PCC switch opens, and the microgrid enters a transitional state. Within a delay of 0.2 s, due to the source being smaller than the load, the voltage and frequency of the microgrid continue to decrease, while the FMS power transmission remains at its initial value. At 2.2 s, the microgrid enters an emergency power supply mode, with the voltage and frequency reaching their lowest points. The FMS provides voltage and frequency support to the microgrid, gradually restoring the voltage and frequency. The FMS output power compensates for the difference between the source and the load, which is 0.3 MW. By employing the strategy proposed in this chapter, during the transitional state of the microgrid, the ESS compensates for the shortfall in active power, resulting in a rapid recovery of the dropped voltage and a significant reduction in frequency fluctuations. The voltage and frequency experience only slight impacts during the switching moment, far smaller than the impacts caused by hard switching of the microgrid mode.

Fig. 5.8
figure 8

Switching process of scenario 1

  1. (2)

    Scenario 2

As shown in Fig. 5.9, by varying the source-to-load ratio, the microgrid enters a transitional state where, within a delay of 0.2 s, the source is greater than the load, resulting in a continuous increase in the voltage and frequency of the microgrid. At 2.2 s, the microgrid enters an emergency power supply mode, with the FMS providing voltage and frequency support to the microgrid. The voltage and frequency gradually recover, and the FMS absorbs power equal to the difference between the source and the load, which is 0.15 MW. By employing the strategy proposed in this chapter, during the transitional state of the microgrid, the ESS absorbs excess active power, resulting in a rapid recovery of the increased voltage and a significant reduction in frequency fluctuations. The voltage and frequency experience only slight impacts during the switching moment, far smaller than the impacts caused by hard switching of the microgrid mode.

Fig. 5.9
figure 9

Switching process of scenario 2

  1. (3)

    Scenario 3

As shown in Fig. 5.10, by varying the magnitude of the switching delay, the microgrid enters a transitional state where, within a delay of 0.5 s, the source is greater than the load, resulting in a continuous increase in the voltage and frequency of the microgrid. The longer the delay, the more severe the voltage and frequency instability. At 2.5 s, the microgrid enters an emergency power supply mode, with the FMS providing voltage and frequency support to the microgrid. The voltage and frequency gradually recover, and the FMS absorbs power equal to the difference between the source and the load, which is 0.15 MW. By employing the strategy proposed in this chapter, during the transitional state of the microgrid, the ESS absorbs excess active power, resulting in a rapid recovery of the increased voltage and a significant reduction in frequency fluctuations. The voltage and frequency experience only slight impacts during the switching moment, far smaller than the impacts caused by hard switching of the microgrid mode.

Fig. 5.10
figure 10

Switching process of scenario 3

To quantify the comparative effects between the proposed strategy and hard switching of the microgrid mode, the maximum voltage and frequency deviations of the microgrid are considered, along with the system recovery time as the performance metric. The system recovery time is defined as the maximum value between the voltage recovery time and the frequency recovery time. The former is calculated based on the time it takes for the voltage to recover to within 90–110% of the rated voltage, while the latter is calculated based on the time it takes for the frequency to recover to within 99–101% of the rated frequency. Refer to Table 5.4 for detailed results.

Table 5.4 Comparison of strategies

Comparing the three scenarios mentioned above, the microgrid mode switching process is influenced by the switching delay and the source-load ratio. Longer switching delays and higher source-load ratios result in larger voltage and frequency deviations, as well as longer recovery times. Hard switching of the mode cannot meet the requirements for safe and stable operation of the microgrid. However, by adopting the proposed smooth switching strategy, significant reductions in frequency and voltage fluctuations during the mode transition process can be achieved. Moreover, the recovery time for both frequency and voltage is substantially shortened. This enables smooth mode switching of the microgrid in different scenarios, providing support for the safe and stable operation of distributed generation (DG) in large-scale integration and cluster consumption.

To further validate the correctness of the theoretical analysis and simulation results, a flexible interconnected microgrid model was constructed on the experimental platform of the RT-LAB hardware-in-the-loop testbed, as shown in Fig. 5.11. The experimental platform consisted of a computer, RT-LAB OP7000 hardware simulation platform, Tektronix MSO44 oscilloscope, an FPGA development board (XILINX FPGA ZYNQ7020) as the controller, and an AN706 module with a maximum sampling frequency of 200 K as the controller sampling module. The experimental parameters are listed in Table 5.2. Scenario 1 was selected for the experiment, where a fault occurred at 1.8 s, the PCC switch opened at 2 s, and FMS mode switching took place at 2.2 s with a 0.2 s delay. The experimental results are shown in Fig. 5.12.

Fig. 5.11
figure 11

RT-LAB test platform

Fig. 5.12
figure 12

Switching process of scenario 1 on RTLAB platform

As shown in Fig. 5.12, through the comparison of microgrid frequency, voltage, and FMS transmission power during smooth switching and hard switching, the proposed strategy effectively raises the microgrid voltage and maintains the microgrid frequency within the 2–2.2 s switching delay. In contrast, hard switching exacerbates the loss of control over voltage and frequency within the switching delay. At 2.2 s, hard switching results in the lowest voltage and frequency, while under the proposed strategy, the microgrid voltage quickly recovers, and the frequency remains within the operating range. After 2.2 s, the FMS transmission power smoothly increases, compensating for the imbalanced source-load situation, and the switching current increases. The switching process and simulation results based on the RT-LAB platform for Scenario 1 are consistent, further validating the effectiveness of the proposed strategy.

5.5 Conclusion

Flexible interconnected microgrids are a key approach to improving the operational efficiency and distributed energy integration capability of the port microgrid. An emergency smooth control strategy for flexible interconnected microgrid modes is proposed in this chapter, which includes a microgrid energy storage adaptive droop coefficient control method and a coordinated phase angle compensation-coordinated control switch-pre-synchronization smooth transition method. These methods address the significant voltage and frequency fluctuations and disturbances in [microgrids caused by switching delays, phase shifts, and abrupt changes in control modes. The main conclusions are as follows:

  1. (1)

    The microgrid energy storage adaptive droop control can quickly suppress imbalanced power within the switching delay, preventing voltage and frequency violations. Coordinated phase angle compensation is used to prevent frequency shocks caused by instantaneous phase angle variations during switching. Coordinated control switching is employed to mitigate voltage shocks caused by sudden changes in output signals, thereby reducing the regulation time.

  2. (2)

    The process of microgrid mode switching is influenced by the switching delay and the ratio of source to load. The longer the switching delay and the larger the source-to-load ratio, the greater the voltage and frequency deviations. Compared to the hard switching process of microgrid modes, the proposed strategy significantly reduces the frequency and voltage deviations during the switching process, thereby shortening the recovery time.

  3. (3)

    The flexible interconnected microgrid structure and operational modes enable the coordination and complementarity of the FMS (Flexible Manufacturing System) and microgrid control capabilities. The adoption of the proposed strategy allows for a smooth transition between microgrid modes, which is advantageous for the safe and stable operation of Distributed Generation (DG) with large-scale integration and cluster-based consumption. It holds significant importance in enhancing the continuous and stable operational capabilities of the power distribution grid based on flexible interconnected technologies.