The structure of the energy storage virtual synchronous machine is shown in Figure 7. The centralized VSG is divided into two levels: energy storage unit and inverter unit. As the VSG pre-stage, the energy storage unit contains energy storage components and DC/DC conversion circuit, which is mainly used to maintain the constant voltage on the DC side of VSG. The type and capacity of energy storage components depend on the functional requirements of VSG. In the grid-connected state, VSG's main function is to improve the frequency and voltage stability of the power grid. Energy storage components only exchange energy in the process of frequency fluctuations, and energy storage components with low capacity density can be selected. In the independent or coupled load, VSG is mainly used as a power supply to provide energy support for the load, and it is necessary to select energy storage components with larger capacity density. The inverter unit of the distributed power supply acts as V