Free Switching Control Strategy for Multi-Operation Modes of Multi-Port Energy Router in Distribution Area

: For the distribution area with a high penetration rate of new energy, the traditional power supply system has some problems, such as a single form of power supply and low utilization of new energy. Because the multi-port energy router can realize the interconnection and complementation of multiple energy forms, it has become the key piece of equipment in the hybrid AC/DC distribution area. Nevertheless, restricted by the existing control strategy, the performance of the energy router in complex operation mode switching and coordinated control still needs to be further improved. To address this issue, the free switching control strategy is proposed in this paper. Firstly, the topology and model of the multi-port energy router are designed and established. Secondly, the operation mode of the system is analyzed, and the control strategy of each port is designed. Then, a reference power calculation method suitable for multi-mode operation is derived. Based on this, the control strategy does not need to be changed when operation modes are switched. Furthermore, the extended state observer is introduced to track and compensate for the new energy disturbance, which can improve the power quality of the system. Finally, the simulation and experimental results show that the proposed control strategy of the multi-port energy router can realize ﬂexible and controllable power transmission among various modules in the distribution area and the free switching of multi-operation modes without changing the control strategy.


Introduction
With the deepening of the low-carbon environmental protection concept, new energy sources, energy storages, DC charging piles of electric vehicles, and flexible loads are growing rapidly [1][2][3]. New energy sources are very important because energy consumption will increase very rapidly in the future, both in industry and in information technology [4]. Nevertheless, the fluctuations of new energy sources (such as wind and solar energy) and the disorderly charging of electric vehicles will have a great impact on the power balance and power quality of the system [5][6][7]. To solve these issues, the energy router (ER) based on advanced power electronic devices and distributed control is widely applied, which can realize multi-directional energy flow and active control of power flow [8,9].
The ER was first proposed by North Carolina State University [10]. In general, the ER is composed of a three-level conversion structure: AC/DC, dual active bridge (DAB), and DC/AC. Since ER contains various AC and DC conversion forms of different voltage levels, it can provide flexible and standardized interfaces for various new energy power generation units and AC/DC loads [11,12]. Therefore, the efficiency of new energy power generation can be improved, and the power exchange between the ER and the grid can be flexibly changed [13,14]. Furthermore, due to the existence of the high-frequency transformer in

Multi-Port ER
Combining the development trend of the distribution area, the ER should i /DC input and output functions when used in the distribution area with a hig tion rate of the new energy. In this paper, a multi-port ER is designed, which is of a three-phase cascaded H-bridge, isolated DC/DC converters, a three-level inv a Buck/Boost converter. The topology of the multi-port ER is shown in Figure 1  The grid side is connected to the medium-voltage DC bus through the c bridges and isolated DC/DC converters. The AC loads in the distribution area ered by a three-level inverter. The new energy power sources, energy storage dium-voltage DC bus are connected through the Buck/Boost converter. This top the characteristics of modularity, which can adapt to different voltage and cur by changing the number of cascaded modules.

High-Voltage Side Topology
The high-voltage side topology is composed of cascaded H-bridges an DC/DC converters. The topology is shown in Figure 2. The capacitance of mediu DC side is designed according to [25]. As we all know, the larger the capacitance it is to reduce the voltage ripple and improve the power quality. However, if t tance is too large, the current conduction angle will be small. Under the sam power, the effective value of the ripple current flowing through the capacitor wi which is the root cause of loss and heating of the capacitor. Based on this, cap medium-voltage DC side is set to 1000 μF in this paper.
Based on the Kirchhoff's voltage law, the mathematical model can be obta  The grid side is connected to the medium-voltage DC bus through the cascade Hbridges and isolated DC/DC converters. The AC loads in the distribution area are powered by a three-level inverter. The new energy power sources, energy storages, and mediumvoltage DC bus are connected through the Buck/Boost converter. This topology has the characteristics of modularity, which can adapt to different voltage and current levels by changing the number of cascaded modules.

High-Voltage Side Topology
The high-voltage side topology is composed of cascaded H-bridges and isolated DC/DC converters. The topology is shown in Figure 2. The capacitance of medium-voltage DC side is designed according to [25]. As we all know, the larger the capacitance, the better it is to reduce the voltage ripple and improve the power quality. However, if the capacitance is too large, the current conduction angle will be small. Under the same output power, the effective value of the ripple current flowing through the capacitor will increase, which is the root cause of loss and heating of the capacitor. Based on this, capacitance of medium-voltage DC side is set to 1000 µF in this paper.
Based on the Kirchhoff's voltage law, the mathematical model can be obtained as: where E x is the grid voltage (x = a, b, c), i x is the grid currents, E xi is the AC voltage of the i-th cascaded H-bridge, U dc1-xi and U dc2-xi are pre-stage voltage and post-stage voltage of the i-th isolated DC/DC converter, S k is switching function of cascaded H-bridge, L s and R s are equivalent inductance and resistance on the grid side, S k1 and S k2 are the switching functions of the pre-stage and post-stage of the isolated DC/DC, and k is the ratio of high frequency transformer. According to Equation (1), the output voltage of the DC side can be adjusted by changing S k so as to realize the electric energy conversion between AC voltage and DC voltage. According to Equation (2), the output voltage of the low-voltage DC side can be adjusted by changing S k 1, S k 2 and k.
The transmission power PDC/DC of the isolated DC/DC converter is： where fs is switching frequency, Lm is the leakage inductance of high-frequenc former, and δ is the pulse shift angle. The transmission power can be adjusted by c δ. Compared with conventional converters, the multi-module topology has g vantages. The voltage and current change rate of bridge arm can be reduced by cade structure, which makes the sub-modules not need to be turned on and off at t time. Therefore, the stress on the switch device decreases greatly, and the tota voltage distortion rate is greatly reduced. Meanwhile, the high-frequency transfor a great attenuation effect on high frequency harmonics. The noise of the power g also be isolated by the transformer. It can avoid mutual interference between the g and secondary side.

DC/DC Converter
The DC/DC converter adopts a non-isolated Buck/Boost structure. The top shown in Figure 3. The design of the LC filter follows the principles proposed Meanwhile, the resonance frequency of the LC filter is less than 1/6 of the samp quency. Therefore, the parameters of the LC filter designed in this paper can en stability of the system and have sufficient control bandwidth [26].  The transmission power P DC/DC of the isolated DC/DC converter is: where f s is switching frequency, L m is the leakage inductance of high-frequency transformer, and δ is the pulse shift angle. The transmission power can be adjusted by changing δ. Compared with conventional converters, the multi-module topology has great advantages. The voltage and current change rate of bridge arm can be reduced by the cascade structure, which makes the sub-modules not need to be turned on and off at the same time. Therefore, the stress on the switch device decreases greatly, and the total output voltage distortion rate is greatly reduced. Meanwhile, the high-frequency transformer has a great attenuation effect on high frequency harmonics. The noise of the power grid will also be isolated by the transformer. It can avoid mutual interference between the grid side and secondary side.

DC/DC Converter
The DC/DC converter adopts a non-isolated Buck/Boost structure. The topology is shown in Figure 3. The design of the LC filter follows the principles proposed in [25]. Meanwhile, the resonance frequency of the LC filter is less than 1/6 of the sampling frequency. Therefore, the parameters of the LC filter designed in this paper can ensure the stability of the system and have sufficient control bandwidth [26].
Meanwhile, the resonance frequency of the LC filter is l quency. Therefore, the parameters of the LC filter design stability of the system and have sufficient control bandw  The low-voltage side (U dcl ) of the DC/DC converter is connected to the new energy module, and the medium-voltage side (U dc ) is connected to the medium-voltage DC bus. When the new energy module supplies power to the DC bus, the DC/DC converter works in Boost mode, which can increase the voltage of the new energy module and output a stable DC voltage. When the power grid charges the energy storage module, the DC/DC converter works in Buck mode, which can convert the DC bus voltage into the working voltage of the energy storage module. The output voltage can be expressed as: where D is the duty ratio of the converter. The non-isolated Buck/Boost structure is simple, which has a relatively small number of power switches. The bidirectional energy flow can be realized through the fully controlled switching devices and reverse parallel diodes. Moreover, the conversion efficiency is high. It is suitable for new energy sources that do not require isolation.

DC/AC Converter
The DC/AC converter adopts a three-level structure. The topology is shown in Figure 4. ergies 2021, 14,7860 The low-voltage side (Udcl) of the DC/DC converter is connecte module, and the medium-voltage side (Udc) is connected to the medi When the new energy module supplies power to the DC bus, the DC/ in Boost mode, which can increase the voltage of the new energy m stable DC voltage. When the power grid charges the energy storage converter works in Buck mode, which can convert the DC bus volta voltage of the energy storage module. The output voltage can be exp where D is the duty ratio of the converter. The non-isolated Buck/Boos which has a relatively small number of power switches. The bidirectio be realized through the fully controlled switching devices and reve Moreover, the conversion efficiency is high. It is suitable for new en not require isolation.

DC/AC Converter
The DC/AC converter adopts a three-level structure. The topolog 4. The output voltage is: where dx is the duty ratio and nx is the benchmarking function for the three switch-status of three-level inverter, which can be expressed as The output voltage is: where d x is the duty ratio and n x is the benchmarking function for the conversion between three switch-status of three-level inverter, which can be expressed as: Compared with the traditional two-level topology, the three-level inverter can output voltage with lower harmonic content and better power quality.

Operation Modes of Distribution Area
Due to the access of new energy power sources, the power supply of the distribution area has changed from a single power supply to joint power supply of new energy sources and power grid. The distribution area shall have priority to absorb the power of new energy. Therefore, the operation mode of the distribution area can be divided into the following four modes. The energy flow of each mode is shown in Figure 5.

Grid-Connected Operation Mode
When new energy module has no energy supply, the distribution area runs connected operation mode. The energy in the distribution area is all supplied by The power grid provides power for AC loads and DC loads and charges for ene age. The power relationship between each module is as follows: where Ppg is the power between grid and medium-voltage DC bus, and the positi tion of Ppg is the direction in which power flows from the grid to the distributio area. Pdl is the DC load's power, Pal is the AC load's power, Pne is the power of new sources, Pbat is the charge and discharge power of energy storage, and the positi tion of Pbat is the direction of power when the battery is discharged.

Grid Support Operation Mode
When the new energy source is insufficient to support the power demand, t bution area runs in grid support operation mode. The grid will supplement the energy. The power relationship between each module is as follows:

Grid-Connected Operation Mode
When new energy module has no energy supply, the distribution area runs in gridconnected operation mode. The energy in the distribution area is all supplied by the grid. The power grid provides power for AC loads and DC loads and charges for energy storage. The power relationship between each module is as follows: where P pg is the power between grid and medium-voltage DC bus, and the positive direction of P pg is the direction in which power flows from the grid to the distribution station area. P dl is the DC load's power, P al is the AC load's power, P ne is the power of new energy sources, P bat is the charge and discharge power of energy storage, and the positive direction of P bat is the direction of power when the battery is discharged.

Grid Support Operation Mode
When the new energy source is insufficient to support the power demand, the distribution area runs in grid support operation mode. The grid will supplement the required energy. The power relationship between each module is as follows:

New Energy Feed Operation Mode
New energy feed operation mode is the mode in which new energy sources feed power to the grid. The new energy module gives priority to the load to supply power. The new energy module feeds power to the grid when the energy is surplus. This mode can support the stability of grid voltage and frequency when there is a voltage or frequency drop in the power grid. The power relationship between each module is as follows:

Isolated Operation Mode
The isolated operation mode is the mode in which all electric energy in the distribution area comes from new energy. At this time, it is necessary to control the output power of energy storage to ensure the energy balance in the distribution area. In addition, when there is a fault on the grid side or the new energy in the distribution area can be self-dissipated, the distribution area runs in isolated operation mode. The power relationship between each module is as follows:    P pg = P dl + P al − (P ne + P bat ) P ne > 0, P ne + P bat > 0 P pg = 0 . (10)

Control Strategy of DC/DC Converter
In the ER system, the continuous fluctuations of new energy will inevitably affect the stability of the system. However, the traditional converters do not have inertia and damping characteristics, which cannot effectively suppress disturbances. In this case, the stability of the DC bus voltage cannot be guaranteed, which will result in a decrease in power quality. To overcome this limitation, the ESO and a VSM control strategy based on the DC machine is proposed for the DC/DC converter to keep the DC bus voltage stable and improve the robustness of the system.
By introducing the mathematical model of the DC machine into the control of the converter, the VSM control strategy brings the inertia and damping characteristics of the DC machine to the system. Specifically, the DC bus voltage of the DC/DC converter is controlled by simulating the electromotive force balance equation and mechanical equation of the DC machine. In this way, the DC/DC converter has external characteristics like those of a DC machine. The electromotive force balance equation of the armature circuit of DC machine can be expressed as: where E = C T Φω is armature voltage, C T is torque coefficient, Φ is magnetic flux, R a is armature resistance, and U and I are the equivalent output voltage and current of the DC machine. The electromagnetic power of DC machine is: The mechanical equation of DC machine is: where T m is mechanical torque, T e = P e / ω is electromagnetic torque, J is the virtual moment of inertia, D p is the damping, ω 0 and ω is rated angular frequency and electrical angular frequency. As shown in Figure 6, by introducing the electromotive force balance equation and virtual mechanical Equations (11)-(13) of the DC machine into the voltage loop control of the DC/DC converter, the output of the DC/DC converter has similar output characteristics to the DC machine. On the one hand, due to the existence of J, the converter has inertia in the power and frequency dynamic process. On the other hand, due to the existence of D p , the converter can dampen the grid power oscillation. Therefore, the VSM control strategy can enhance the inertia and damping characteristics of the DC/DC converter system and improve the stability of the DC bus voltage. The parameters of J and D p can be designed according to [27,28]. By analyzing the frequency drooping and regulation of active power related to VSM, active power loops and reactive power loops are decoupled. Based on this, J and D p are set to 0.5 kg·m 2 and 300 N·m·s/rad.
Energies 2021, 14, 7860 9 reduce the influence of disturbances on system stability. Therefore, the proposed co strategy can better cope with the fluctuation of new energy and effectively suppor stable operation of the distribution area. According to Equations (11)- (17), the control strategy of virtual DC machine ESO is obtained. The control structure of the control strategy is shown in Figure 6 error between the reference value of DC bus Udcref and actual value Udc is sent into t controller to obtain the magnitude of the current, then multiplied with Udcref to obtai After dividing by ω0, the mechanical torque is obtained. Then, the z2 is used as the pensation term of the virtual torque to compensate for the disturbance and go thr Equation (11) to obtain the reference current Iref. Finally, the switch tube is controlle In addition, due to the unpredictability of new energy and load disturbances, the ESO is extended to VSM control in this paper to further improve control performance. The design process of ESO is as follows: According to the principle of ESO [29], in the first order system with a state variable of x 1 , the disturbance of the system can be easily observed by expanding the disturbance to a new state variable x 2 . In this way, when the system is disturbed by the unpredictable fluctuations of new energy and loads, the ESO can comprehensively estimate all external disturbances. In this paper, the state variable x 1 is set as ω. Therefore, the system of VSM control strategy can be expressed as: .
where w(t) is the real-time action of the sum of disturbances to the system. Then, a non-linear function is constructed according to Equation (14): where β 1 and β 2 are the gain of the output error, z 1 is the observed value of ω, and z 2 is the estimated value of disturbance. It is necessary to select a suitable non-linear function g(z) to realize the accurate tracking of z 1 to ω. Only in this way, the ESO can accurately calculate z 2 , which is fed back to the control system as the compensation term for disturbance. Thus, to improve the efficiency of state tracking of ESO, a continuously differentiable fak function is added in ESO: where e is tracking error and α and µ are nonlinear factors. The fak function is continuous and derivable, so the response speed and stability of the system can be improved. According to [30], the value range of α is (0,1), and the values of α and u determine the tracking speed and filtering effect. To improve the compensation effect for disturbance, α and u are set to 0.6 and 5000 [31]. Submitting the fak function into the g(z) in (15), the designed ESO can be obtained as: The values of β 1 and β 2 can be designed by the "bandwidth method" [31]. In this paper, β 1 = 1 × 10 4 , β 2 = 1 × 10 8 . Through the observation, estimation, and compensation of disturbances by ESO, z 1 can track the value of ω. Then z 2 is calculated as a virtual torque compensation term and fed back to the mechanical equation of the virtual DC machine to reduce the influence of disturbances on system stability. Therefore, the proposed control strategy can better cope with the fluctuation of new energy and effectively support the stable operation of the distribution area.
According to Equations (11)-(17), the control strategy of virtual DC machine with ESO is obtained. The control structure of the control strategy is shown in Figure 6. The error between the reference value of DC bus U dcref and actual value U dc is sent into the PI controller to obtain the magnitude of the current, then multiplied with U dcref to obtain P m . After dividing by ω 0 , the mechanical torque is obtained. Then, the z 2 is used as the compensation term of the virtual torque to compensate for the disturbance and go through Equation (11) to obtain the reference current I ref . Finally, the switch tube is controlled by PI controller and modulation link. Thus, the voltage of DC bus is controlled.
The VSM control strategy provides inertia and damping characteristics for the power electronic converter, while the ESO plays a role in observing and compensating for the fluctuation of new energy sources. Therefore, the control strategy of the DC/DC converter can stabilize the voltage of DC bus better when the new energy source fluctuates and can effectively promote the anti-disturbance ability of the system.

Free Switching Control Strategy for High-Voltage Side
To meet the requirements of multi-directional power flow in the ER system, the control strategy applied to the high-voltage side cascaded H-bridge needs to realize free switching between different operation modes. The control target is to achieve accurate tracking and active control of power.
Different from the VSM control strategy based on the DC machine in Section 4.1, the VSM control strategy based on the AC machine is applied in the control strategy of the cascaded H-bridge. The inductance and resistance on the AC side of the cascaded Hbridge can be equivalent to the synchronous inductance and resistance of the synchronous machine. Thus, the electrical equation of cascaded H-bridge can be derived as: Like Section 4.1, this formula and mechanical equation are introduced into the control of the cascaded H-bridge so that the system has external characteristics like the synchronous machine, which improves the stability of the system. Furthermore, to achieve control of power, the active-frequency (P/f ) control and reactive-voltage (Q/v) control are integrated in the cascaded H-bridge control strategy.
For the P/f control in the VSM control strategy, it is implemented according to the operating principle of traditional synchronous machine, which regulates the active output by adjusting the mechanical torque and realizes the response to the grid frequency deviation through the frequency modulator. Therefore, the P/f control realizes the adjustment of the active power command of the cascaded H-bridge by adjusting the virtual mechanical torque T m of the VSM. For the Q/v control in the VSM control strategy, like the synchronous machine, the terminal voltage and reactive power are changed by adjusting virtual potential E p of the VSM.
Compared with the traditional PQ control strategy, the P/f and Q/v control of VSM have superior control performance. Besides the accurate tracking of active power and reactive power, the VSM control strategy can also actively adjust frequency deviation and the voltage of the distribution network.
Based on the above control strategy, the active control of the power flow and accurate tracking of the reference power P ref can be realized. Further, to achieve the multi-mode operation of the proposed ER and the free switching between different modes, the reference power needs to be accurately calculated and automatically adjusted.
According to the power relationship between each module of the different operation modes in Section 3, the reference power of the cascaded H-bridge can be obtained as: where P l = P al + P dl . Combining the transmission power of the isolated DC/DC converter in Equation (3), the reference voltage at U dc1 can be obtained: where D = δ/π is the duty ratio of the converter. Then, through the DC voltage controller and combined with the reference voltage U dc1ref , the power adjustment amount ∆P can be obtained. Based on this, the total power required by the high-voltage side can be obtained as: With the above method, the reference power in the VSM control strategy can be automatically changed according to the power flow during actual operation. Without changing the control strategy, the proposed control strategy can meet the power flow demand in each operation mode, which improves the stability and reliability of the system.
In summary, combining Equations (18)-(21), the free switching control strategy using VSM for cascaded H-bridge is obtained.
The complete control structure of the high-voltage side is shown in Figure 7. The inputs of control are E x , U dclref , P pg , Q pg , and f. The outputs are drive signal required for the converter. The outer control of the cascaded H-bridge is power control. After calculating P set , the P/f control and the Q/v control are performed. The inner control is VSM control, the virtual angular frequency ω is obtained through the virtual mechanical equation, and then, U xref is obtained through the virtual electrical equation. Finally, after the carrier shift term sinusoidal pulse width modulation strategy, the drive signal required by the power electronic converter is output. Meanwhile, the post-stage of isolated DC/DC converter uses voltage loop control, and the pre-stage modulates the DC signal into a square wave with a duty ratio of 50%. After passing through the post-stage of the transformer, it is rectified back to the DC signal.  To sum up, the VSM control strategy and ESO are applied in a cascaded H-bridg and DC/DC converter to improve the stability of the system. For the three-level converte this paper adopts a simple voltage-current double closed-loop control strategy [32]. Fur ther, a free switching control strategy is proposed to realize free switching of differen  To sum up, the VSM control strategy and ESO are applied in a cascaded H-bridge and DC/DC converter to improve the stability of the system. For the three-level converter, this paper adopts a simple voltage-current double closed-loop control strategy [32]. Further, a free switching control strategy is proposed to realize free switching of different working modes, which is achieved by automatically changing the power reference according to the power flow. During the operation of the system, there is no need to change the control strategy, which improves the reliability of the system and load power supply.

Simulation and Experimental Results
To validate the performance of proposed scheme, both simulation and experiment are performed. The key parameters of the system and control strategy are listed in Table 1. The rated voltage of U dc , u(t), and E(t) are selected from the common voltage levels of the power system [33][34][35][36].

Simulation Results
The simulation model of the proposed ER system and control strategy is shown in Figure 8, which is established by MATLAB/Simulink. As shown in Figure 8a, the main circuit of the ER model includes high-voltage side topology (cascaded H-bridge and isolated DC/DC converter), three-level inverter, DC/DC converter, AC/DC loads and new energy, which are consistent with Figure 1. In Figure 8b, the control strategy of the DC/DC converter established according to Figure 6 is shown in detail, which is a VSM control strategy based on a virtual DC machine with ESO. The VSM-based free switching control strategy applied to the high-voltage side established according to Figure 7 is shown in Figure 8c, which includes P/f control, Q/v control, free switching control, and VSM control.

Single Mode Simulation Results
Case 1: Overload operation in the new energy feed operation mode and the grid support operation mode. The simulation results are shown in Figure 9: In Figure 9, the dynamic performance of the proposed control strategy is verified when the system is operating in the above two modes. Since the mechanical equation and electromotive force balance equation of the synchronous machine are applied to the DC bus voltage control, the system has the inertia and damping characteristics of the synchronous machine. Therefore, when the load changes from full load (100 kW) to overload (110 kW), the proposed control strategy can keep the DC bus voltage stable and efficiently supply power to the load.
Furthermore, because the power provided by the new energy remains unchanged, when the load increases, the energy feed to the grid by the distribution area is reduced, as shown in Figure 9a. Similarly, when the system is operating in grid support operation  Figure 9b, the increased power of the load is supplied by the grid. Therefore, the increase in load power is the same as grid power. In summary, the simulation results are in good agreement with Equations (8) and (9), which verify the correctness of the theoretical analysis.

Simulation Results
The simulation model of the proposed ER system and control strategy is shown in Figure 8, which is established by MATLAB/Simulink. As shown in Figure 8a, the main circuit of the ER model includes high-voltage side topology (cascaded H-bridge and isolated DC/DC converter), three-level inverter, DC/DC converter, AC/DC loads and new energy, which are consistent with Figure 1. In Figure 8b, the control strategy of the DC/DC converter established according to Figure 6 is shown in detail, which is a VSM control strategy based on a virtual DC machine with ESO. The VSM-based free switching control strategy applied to the high-voltage side established according to Figure 7 is shown in Figure 8c, which includes P/f control, Q/v control, free switching control, and VSM control.   Figure 9: In Figure 9, the dynamic performance of the proposed control strategy is verified when the system is operating in the above two modes. Since the mechanical equation and   Since the system is all power by the grid when running in grid-connected operation mode, the voltage drop of the power grid has the greatest impact on the system at this time. Fortunately, the VSM control strategy applied in this paper provides inertia and  Case 2: Grid voltages drop in the grid-connected operation mode. To verify the stability of the proposed ER system when the grid voltage drops, the grid voltage drops by 40% at 0.5 s and lasts for 10 cycles. The simulation results are shown in Figure 10. Since the system is all power by the grid when running in grid-connected operation mode, the voltage drop of the power grid has the greatest impact on the system at this time. Fortunately, the VSM control strategy applied in this paper provides inertia and Since the system is all power by the grid when running in grid-connected operation mode, the voltage drop of the power grid has the greatest impact on the system at this time. Fortunately, the VSM control strategy applied in this paper provides inertia and damping to the system. Specifically, on the one hand, due to the existence of J (virtual moment of inertia), the system has inertia in the dynamic response process of power and frequency. On the other hand, due to the existence of D p (damping), the system can dampen grid power fluctuations. It can be seen from Figure 10 that, when the grid voltage drops or rises, both the DC bus voltage and AC output voltage have a small degree of distortion. However, they can restore stability in a very short period. The system can quickly restore stability while maintaining superior power quality.
Case 3: The random fluctuation of new energy in isolated operation mode. In practice, the random fluctuation of new energy will affect the stability of the system, which has the greatest impact on isolated operation mode especially. Thus, the simulation of the impact of new energy fluctuation on the system is carried out in isolated operation mode. The simulation results are shown in Figure 11. damping to the system. Specifically, on the one hand, due to the existence of J (virtual moment of inertia), the system has inertia in the dynamic response process of power and frequency. On the other hand, due to the existence of Dp (damping), the system can dampen grid power fluctuations. It can be seen from Figure 10 that, when the grid voltage drops or rises, both the DC bus voltage and AC output voltage have a small degree of distortion. However, they can restore stability in a very short period. The system can quickly restore stability while maintaining superior power quality.
Case 3: The random fluctuation of new energy in isolated operation mode. In practice, the random fluctuation of new energy will affect the stability of the system, which has the greatest impact on isolated operation mode especially. Thus, the simulation of the impact of new energy fluctuation on the system is carried out in isolated operation mode. The simulation results are shown in Figure 11.
In this paper, the ESO is introduced into VSM control, which can estimate the disturbance to compensate for virtual torque. Therefore, the stability of the system is significantly improved. It can be clearly seen from Figure 11a that the voltage of the mediumvoltage DC bus is not affected by the fluctuation of the new energy, which reveals that the proposed control strategy can effectively suppress the impact of the fluctuation of the new energy on the system. Meanwhile, as shown in Figure 11b, the enhancement of system stability can also improve the quality of the AC output voltage (THD = 1.74%). Even if the new energy source fluctuates, the system can still supply the load stably.

Simulation Results of Free Switching Control Strategy
To verify the proposed free switching strategy of the ER and the transient response during the switching process, the system is set to switch from isolated operation mode to new energy feed operation mode at 0.4 s, switch to grid support operation mode at 1.2 s, and switch to grid-connected operation mode at 2 s in the simulation. The power flow of In this paper, the ESO is introduced into VSM control, which can estimate the disturbance to compensate for virtual torque. Therefore, the stability of the system is significantly improved. It can be clearly seen from Figure 11a that the voltage of the medium-voltage DC bus is not affected by the fluctuation of the new energy, which reveals that the proposed control strategy can effectively suppress the impact of the fluctuation of the new energy on the system. Meanwhile, as shown in Figure 11b, the enhancement of system stability can also improve the quality of the AC output voltage (THD = 1.74%). Even if the new energy source fluctuates, the system can still supply the load stably.

Simulation Results of Free Switching Control Strategy
To verify the proposed free switching strategy of the ER and the transient response during the switching process, the system is set to switch from isolated operation mode to new energy feed operation mode at 0.4 s, switch to grid support operation mode at 1.2 s, and switch to grid-connected operation mode at 2 s in the simulation. The power flow of each mode set by simulation is shown in Table 2. The simulation results are shown in Figure 12. (a) Bus voltage, grid currents, and power.
(b) THD of the low-voltage AC side

Simulation Results for Performance Comparison
To further verify the effectiveness of the proposed method, the proposed method is compared with the existing related control methods, which are all used to ensure stable operation of multi-port energy routers under different working conditions and operation  Figure 12a shows the DC bus voltage, grid-side currents, grid-side power, new energy power, and load power when the operating mode is switching. Figure 12b shows the THD of AC output voltage. As can be seen from Figure 12a, when any operation mode is switched, the DC bus voltage can be kept constant. The system initially operates in isolated operation mode, and the system is all powered by new energy sources. When switching from isolated operation mode to new energy feed operation mode, the high-voltage side of the ER is put into operation. The grid-side currents can quickly track the reference current, and the grid absorbs 20 kW of power. When switching from new energy feed operation mode to grid support operation mode, the grid currents are reversed instantaneously. The power grid changed from absorbing power to outputting 80 kW of power, and it remained stable in a short period of time. Meanwhile, the time required for switching is less than 0.1 s, and the power can be kept constant after switching. Finally, the system changes to grid-connected operation mode, new energy sources stop generating power, and all loads are supplied by the grid. In addition, in the entire mode switching process, the AC output voltages have always maintained a good power quality. It can be seen from the Figure 12b that the THD of the AC output voltage is 2.33%, which can maintain a good waveform.

Simulation Results for Performance Comparison
To further verify the effectiveness of the proposed method, the proposed method is compared with the existing related control methods, which are all used to ensure stable operation of multi-port energy routers under different working conditions and operation modes. Therefore, the droop control method [18] and the traditional VSM control method [17] are selected as the benchmark work for the performance comparison. The simulation results are shown in Figures 13 and 14. (b) THD of the low-voltage AC side

Simulation Results for Performance Comparison
To further verify the effectiveness of the proposed method, the proposed method is compared with the existing related control methods, which are all used to ensure stable operation of multi-port energy routers under different working conditions and operation modes. Therefore, the droop control method [18] and the traditional VSM control method [17] are selected as the benchmark work for the performance comparison. The simulation results are shown in Figures 13 and 14. Figure 13 shows the simulation results when the load is suddenly reduced by 10 kW. As shown in Figure 13a, when the droop control is adopted, the change in the load will cause the DC voltage to increase and cannot be restored to the reference value. The reason is that droop control has no inertia and damping characteristics, and the system characteristics become differential regulation, which will cause errors between the output of the system and the reference value. Therefore, the DC bus voltage cannot accurately track the reference value. More importantly, in this case, if the error exceeds the allowable range, it may even cause the ER to fail to meet the grid connection requirements and seriously affect the power supply to the load.
On the contrary, as shown in Figure 13b, when the proposed method is adopted, the inertia and damping characteristics given to the system improve the stability of the system. Therefore, when the load suddenly decreases, the DC bus voltage will quickly return to the reference value after a short and small fluctuation.   Figure 14 shows the simulation results of the traditional VSM control when the new energy fluctuates. Since the traditional method does not have ESO, compared with Figure  11b, the THD of the AC output voltage is increased from 1.74% to 3.37%. The simulation result proves that ESO can effectively observe, calculate, and compensate for disturbance items and feed the compensation term back to the control strategy. Therefore, the stability and reliability of the system have been improved.

Experimental Results
The experimental set up and experimental algorithm are shown in Figure 15. To ver ify the effects of the proposed control method, the experiment was conducted using the OPAL-RT platform as shown in Figure 15a. The experimental algorithm of the proposed method is executed in this platform, and the practical feasibility of the proposed method  As shown in Figure 13a, when the droop control is adopted, the change in the load will cause the DC voltage to increase and cannot be restored to the reference value. The reason is that droop control has no inertia and damping characteristics, and the system characteristics become differential regulation, which will cause errors between the output of the system and the reference value. Therefore, the DC bus voltage cannot accurately track the reference value. More importantly, in this case, if the error exceeds the allowable range, it may even cause the ER to fail to meet the grid connection requirements and seriously affect the power supply to the load.
On the contrary, as shown in Figure 13b, when the proposed method is adopted, the inertia and damping characteristics given to the system improve the stability of the system. Therefore, when the load suddenly decreases, the DC bus voltage will quickly return to the reference value after a short and small fluctuation. Figure 14 shows the simulation results of the traditional VSM control when the new energy fluctuates. Since the traditional method does not have ESO, compared with Figure 11b, the THD of the AC output voltage is increased from 1.74% to 3.37%. The simulation result proves that ESO can effectively observe, calculate, and compensate for disturbance items and feed the compensation term back to the control strategy. Therefore, the stability and reliability of the system have been improved.

Experimental Results
The experimental set up and experimental algorithm are shown in Figure 15. To verify the effects of the proposed control method, the experiment was conducted using the OPAL-RT platform as shown in Figure 15a. The experimental algorithm of the proposed method is executed in this platform, and the practical feasibility of the proposed method is verified in the designed ER system, as shown in Figure 15b. items and feed the compensation term back to the control strategy. Therefore, the stability and reliability of the system have been improved.

Experimental Results
The experimental set up and experimental algorithm are shown in Figure 15. To verify the effects of the proposed control method, the experiment was conducted using the OPAL-RT platform as shown in Figure 15a. The experimental algorithm of the proposed method is executed in this platform, and the practical feasibility of the proposed method is verified in the designed ER system, as shown in Figure 15b.

Single Mode Experimental Results
Case 1: Overload operation in new energy feed operation mode and grid support operation mode. The experiment results are shown in Figure 16, where Pn = Pne + Pbat is the power of new energy module.
Due to the inertia and damping characteristics introduced by the proposed VSMbased control strategy with ESO, the stability of the system has been further improved. Therefore, as shown in Figure 16 when the load suddenly increases by 10% from the full load power, the medium-voltage DC bus voltage can remain stable. In addition, when the load power changes, the proposed control strategy will change the power absorbed or output by the grid to ensure power balance, which verifies the correctness of the theoretical analysis and control method in this paper.

Single Mode Experimental Results
Case 1: Overload operation in new energy feed operation mode and grid support operation mode. The experiment results are shown in Figure 16, where P n = P ne + P bat is the power of new energy module.
Due to the inertia and damping characteristics introduced by the proposed VSM-based control strategy with ESO, the stability of the system has been further improved. Therefore, as shown in Figure 16 when the load suddenly increases by 10% from the full load power, the medium-voltage DC bus voltage can remain stable. In addition, when the load power changes, the proposed control strategy will change the power absorbed or output by the grid to ensure power balance, which verifies the correctness of the theoretical analysis and control method in this paper.
Case 2: Grid voltage drops in grid-connected operation mode. The experiment results are shown in Figure 17.  Figure 17.
When the grid voltage drops suddenly by 40%, the DC bus voltage and the low-voltage side AC bus voltage in the grid-connected operation mode are shown in Figure 17a and b. It can be clearly seen that the proposed control strategy can still ensure the stability of the DC bus voltage when the grid voltages drops. More importantly, the quality of the output voltages on the low-voltage AC side is also maintained (THD = 4.11%), which provides stable power to the load. Therefore, the control performance of the proposed control strategy is verified when the grid voltages drop.   Figure 18.
The medium-voltage DC bus voltage and the low-voltage side AC bus voltages at this time are shown in Figure 18a and b. Due to the application of ESO, the disturbances of new energy sources can be fed back to the control system to reduce the influence of disturbances on system stability. Therefore, as shown in Figure 18b,c, even when the new energy source fluctuates, the quality of the medium-voltage DC bus voltage and the output voltages of the low-voltage AC side is guaranteed.  Case 2: Grid voltage drops in grid-connected operation mode. The experiment results are shown in Figure 17.
When the grid voltage drops suddenly by 40%, the DC bus voltage and the low-voltage side AC bus voltage in the grid-connected operation mode are shown in Figure 17a and b. It can be clearly seen that the proposed control strategy can still ensure the stability of the DC bus voltage when the grid voltages drops. More importantly, the quality of the output voltages on the low-voltage AC side is also maintained (THD = 4.11%), which provides stable power to the load. Therefore, the control performance of the proposed control strategy is verified when the grid voltages drop.   Figure 18.
The medium-voltage DC bus voltage and the low-voltage side AC bus voltages at this time are shown in Figure 18a and b. Due to the application of ESO, the disturbances of new energy sources can be fed back to the control system to reduce the influence of disturbances on system stability. Therefore, as shown in Figure 18b,c, even when the new energy source fluctuates, the quality of the medium-voltage DC bus voltage and the output voltages of the low-voltage AC side is guaranteed. When the grid voltage drops suddenly by 40%, the DC bus voltage and the low-voltage side AC bus voltage in the grid-connected operation mode are shown in Figure 17a,b. It can be clearly seen that the proposed control strategy can still ensure the stability of the DC bus voltage when the grid voltages drops. More importantly, the quality of the output voltages on the low-voltage AC side is also maintained (THD = 4.11%), which provides stable power to the load. Therefore, the control performance of the proposed control strategy is verified when the grid voltages drop.
Case 3: The random fluctuation of new energy in isolated operation mode. The experiment results are shown in Figure 18.
The medium-voltage DC bus voltage and the low-voltage side AC bus voltages at this time are shown in Figure 18a,b. Due to the application of ESO, the disturbances of new energy sources can be fed back to the control system to reduce the influence of disturbances on system stability. Therefore, as shown in Figure 18b,c, even when the new energy source fluctuates, the quality of the medium-voltage DC bus voltage and the output voltages of the low-voltage AC side is guaranteed.

Experimental Results of Free Switching Control Strategy
To verify the effectiveness of the proposed VSM-based free switching control strategy, the experimental results of switching between different operations modes are shown in Figures 19-21. The power flow of each operation mode is the same as Table 2.

Experimental Results of Free Switching Control Strategy
To verify the effectiveness of the proposed VSM-based free switching control strategy, the experimental results of switching between different operations modes are shown in Figures 19-21. The power flow of each operation mode is the same as Table 2.
It can be seen from Figure 19a that when the output power of the new energy is reduced, the system switches from the new energy feed operation mode to the grid support operation mode. At this time, as shown in Figure 19b, the direction of the grid currents is reversed, and the grid outputs 80 kW of power. When the system switches from grid support operation mode to grid-connected operation mode, as shown in Figure 20a, the new energy module changes from output power to energy storage. Therefore, the power output from the grid needs to be further increased to 110 kW. In Figure 21, the system switches from grid-connected operation mode to isolated operation mode, and all loads are powered by new energy sources. Therefore, the grid output power and currents are changed to zero, and the load power is the same as the new energy power. Furthermore, it can be clearly seen from Figures 19-21 that the DC bus voltage can remain stable and the quality of the grid currents is good during the transient process of various mode switching.

Experimental Results of Free Switching Control Strategy
To verify the effectiveness of the proposed VSM-based free switching control strategy, the experimental results of switching between different operations modes are shown in Figures 19-21. The power flow of each operation mode is the same as Table 2.
It can be seen from Figure 19a that when the output power of the new energy is reduced, the system switches from the new energy feed operation mode to the grid support operation mode. At this time, as shown in Figure 19b, the direction of the grid currents is reversed, and the grid outputs 80 kW of power. When the system switches from grid support operation mode to grid-connected operation mode, as shown in Figure 20a, the new energy module changes from output power to energy storage. Therefore, the power output from the grid needs to be further increased to 110 kW. In Figure 21, the system switches from grid-connected operation mode to isolated operation mode, and all loads are powered by new energy sources. Therefore, the grid output power and currents are changed to zero, and the load power is the same as the new energy power. Furthermore, it can be clearly seen from Figures 19-21 that the DC bus voltage can remain stable and the quality of the grid currents is good during the transient process of various mode switching.

Experimental Results for Performance Comparison
To verify the effectiveness of the proposed method, the proposed method is compared with droop control and traditional VSM control. The experiment results are shown in Figures 22 and 23.   It can be seen from Figure 19a that when the output power of the new energy is reduced, the system switches from the new energy feed operation mode to the grid support operation mode. At this time, as shown in Figure 19b, the direction of the grid currents is reversed, and the grid outputs 80 kW of power. When the system switches from grid support operation mode to grid-connected operation mode, as shown in Figure 20a, the new energy module changes from output power to energy storage. Therefore, the power output from the grid needs to be further increased to 110 kW. In Figure 21, the system switches from grid-connected operation mode to isolated operation mode, and all loads are powered by new energy sources. Therefore, the grid output power and currents are changed to zero, and the load power is the same as the new energy power. Furthermore, it can be clearly seen from Figures 19-21 that the DC bus voltage can remain stable and the quality of the grid currents is good during the transient process of various mode switching.

Experimental Results for Performance Comparison
To verify the effectiveness of the proposed method, the proposed method is compared with droop control and traditional VSM control. The experiment results are shown in

Experimental Results for Performance Comparison
To verify the effectiveness of the proposed method, the proposed method is compared with droop control and traditional VSM control. The experiment results are shown in Figures 22 and 23.    As shown in Figure 22a, due to the differential adjustment characteristics of droop control, when the load suddenly decreases, the DC bus voltage cannot remain stable at the reference value. On the contrary, the proposed method can provide effective inertia and damping characteristics for the system. Therefore, the proposed method can quickly stabilize the bus voltage in Figure 22b when the load is suddenly reduced. Furthermore, comparing Figures 18 and 23, when the traditional VSM control without ESO is applied, the THD on the low-voltage AC side increased from 4.11% to 6.47%, and the ripple of the DC bus voltage is increased. The experimental result proves that ESO can compensate well for system disturbances when new energy sources fluctuate and improve the power quality of the system.
It is worth noting that there are some differences in power quality between experimental results and simulation results. For example, compared with the simulation results in Figure 12, the power fluctuations in Figures 19-21 of the experimental results are increased. The differences are caused by the different working conditions of simulation and experiment. The simulation is based on ideal conditions, and the experiment is based on actual experimental equipment. Specifically, there are two main reasons. On the one hand, the actual hardware system itself is composed of various power electronic devices; inevitably, there are parasitic resistance, parasitic capacitance, stray inductance, and other unfavorable factors that affect the experimental results. On the other hand, the external environment will have various uncertain interferences on the experimental results, such as electromagnetic interference (EMI), electromagnetic susceptibility (EMS) of electronic equipment, noise, temperature, and humidity, etc., which will affect the power quality during actual operation. However, it can be seen from the simulation and experimental results that they are qualitatively the same and only slightly different in quantitative terms. These differences are inevitable in actual operation and are within an acceptable range. Therefore, although the power quality of the experimental results is slightly lower than that of the simulation results, it can still meet the power grid operation requirements, and the effectiveness of the proposed method has been verified.
In summary, the proposed free switching control strategy can achieve free switching of different operating modes without changing the control strategy, which is achieved by automatically changing the power reference according to the power flow. At the same time, due to the introduction of VSM control strategy and ESO, inertia and damping characteristics are added to the system, which enhance the system's ability to resist disturbances. Therefore, the system can quickly restore stability after switching between different modes.

Conclusions
In this paper, a free switching control strategy for multi-port ER is proposed, which is suitable for the distribution area with a high penetration rate of the new energy. Firstly, As shown in Figure 22a, due to the differential adjustment characteristics of droop control, when the load suddenly decreases, the DC bus voltage cannot remain stable at the reference value. On the contrary, the proposed method can provide effective inertia and damping characteristics for the system. Therefore, the proposed method can quickly stabilize the bus voltage in Figure 22b when the load is suddenly reduced. Furthermore, comparing Figures 18 and 23, when the traditional VSM control without ESO is applied, the THD on the low-voltage AC side increased from 4.11% to 6.47%, and the ripple of the DC bus voltage is increased. The experimental result proves that ESO can compensate well for system disturbances when new energy sources fluctuate and improve the power quality of the system.
It is worth noting that there are some differences in power quality between experimental results and simulation results. For example, compared with the simulation results in Figure 12, the power fluctuations in Figures 19-21 of the experimental results are increased. The differences are caused by the different working conditions of simulation and experiment. The simulation is based on ideal conditions, and the experiment is based on actual experimental equipment. Specifically, there are two main reasons. On the one hand, the actual hardware system itself is composed of various power electronic devices; inevitably, there are parasitic resistance, parasitic capacitance, stray inductance, and other unfavorable factors that affect the experimental results. On the other hand, the external environment will have various uncertain interferences on the experimental results, such as electromagnetic interference (EMI), electromagnetic susceptibility (EMS) of electronic equipment, noise, temperature, and humidity, etc., which will affect the power quality during actual operation. However, it can be seen from the simulation and experimental results that they are qualitatively the same and only slightly different in quantitative terms. These differences are inevitable in actual operation and are within an acceptable range. Therefore, although the power quality of the experimental results is slightly lower than that of the simulation results, it can still meet the power grid operation requirements, and the effectiveness of the proposed method has been verified.
In summary, the proposed free switching control strategy can achieve free switching of different operating modes without changing the control strategy, which is achieved by automatically changing the power reference according to the power flow. At the same time, due to the introduction of VSM control strategy and ESO, inertia and damping characteristics are added to the system, which enhance the system's ability to resist disturbances. Therefore, the system can quickly restore stability after switching between different modes.

Conclusions
In this paper, a free switching control strategy for multi-port ER is proposed, which is suitable for the distribution area with a high penetration rate of the new energy. Firstly, this paper designs the topology of multi-port ER. Moreover, the multi-operation modes and power flow of the distribution area are analyzed in detail. Based on this, the corresponding control strategy of ER is studied. To improve the acceptance capacity of new energy, ESO is introduced to control strategy of DC/DC converter based on the VSM control strategy. The ESO can observe the fluctuations of new energy and compensate them back to the control strategy after calculation. Meanwhile, aiming at different energy flows in multi-operation modes, a free switching control strategy is designed. This control strategy can accurately transmit the required power and maintain the stability of the DC bus voltage. Finally, the effectiveness of the proposed strategy is verified by simulation and experimental results. For simulation, it can test the effect of the proposed method in the designed ER system under ideal conditions. The experimental results verify the feasibility of the proposed method. The results prove that the designed ER can realize convenient access to the new power sources and flexible loads, and the proposed VSM-based free switching control strategy can effectively improve the robustness of the system and achieve smooth switching between different operating modes.