## 3 Control Strategy
### Output Stage Control  
The output stage of the proposed novel PET shown in Figure 2 consists of an AC output port and a DC output port. The AC output port connects the medium- and low-voltage AC distribution networks, and the DC output port connects the low-voltage DC distribution network. Different structures can be applied for the port converter according to the voltage level of the connected network and the power transmission mode, etc.  
As explained previously, the AC output port adopts the MMC structure and connects to the 10 kV AC distribution networks in the model of this paper. The circuit topology is shown in the grey part of Figure 2 and the mathematical model of MMC is explained in Section 3.1.1. The control method of the converter depends on the operation mode of the power grid it connects, and the traditional P/Q control is applied when the connected network is grid-tied. Figure 5 shows the block diagram of the inverter where the outer loop power control adjusts the active power and reactive power, and the inner current loop is designed to follow the reference of the output current in the rotating d-q axis and obtain the modulating signal. The inverter uses V/F control when the point of common coupling (PCC) is disconnected in order to provide a voltage source with constant voltage amplitude and frequency for the lower grid.  
The DC output port connects the low-voltage DC distribution network by a buck/boost converter. It adopts a dual-loop control strategy that with outer voltage loop and inner current loop in order to  
Figure 4: Block diagram of VSM-based MMC.  
Figure 5: Block diagram of the AC output port.  
quickly stabilize the input voltage instead of directly controlling the power. Figure 6 a,b show the topology and control block diagram of DC output port, respectively, where \(U_{\text{dc2}}\) is the measured value of input DC voltage, \(U_{\text{dc2 ref}}\) is the reference of \(U_{\text{dc2}}\), \(I_{\text{d}}\) is the output DC current, \(I_{\text{dref}}\) is the reference of \(I_{\text{d}}\), and \(D\) is the control signal of the converter.  
Besides being partially supplied by the upper grid via PET, the load within the DC distribution network is mainly supplied by renewable electricity generation such as wind turbines (WTs) and photovoltaics (PVs). When the load changes or the power supply fluctuates, the real-time balance of the power and continuous power supply for the load can be guaranteed by the energy storage system (ESS) within the DC distribution network. Therefore, it is possible to enable PET to provide auxiliary services such as frequency regulation for the upper grid by adjusting the output power of DC output port.  
The power (\(\Delta P_{\text{PFR}}\)) participating in the PFR of the upper power grid from DC port can be calculated by Equation (14) and the output power set value (\(P_{\text{2 set}}\)) is given by Equation (15).  
\[\Delta P_{\text{PFR}}=k_{\text{f}}(f-f_{0}) \tag{14}\]  
\[P_{\text{2 set}}=P_{0}+\Delta P_{\text{PFR}} \tag{15}\]  
where \(k_{\text{f}}\) is the active power-frequency (\(P\)-\(f\)) droop coefficient,\(f_{0}\) is the rated grid frequency, \(f\) is the measured value of grid frequency, \(P_{\text{2 set}}\) is the output power set value of DC port, and \(P_{0}\) is the initial output power.  
Due to the power limit of ESS, the output power of DC port has upper and lower bounds as shown in Equation (16):  
\[P_{\text{min}}\leq P_{\text{set}}\leq P_{\text{max}} \tag{16}\]