In order to analyze the synergistic power control of three-terminal power electronic transformer in power grid, AC microgrid and DC microgrid. A method to determine the expected value of energy storage state is proposed according to the power of distributed energy generation and the loss of power supply probability in the microgrid. Based on the value of energy storage capacity and the relationship among the source, load and energy storage, the type of microgrid is divided into Power microgrid and Load microgrid. According to the type of microgrid, Power electronic transformer control the power in AC and DC microgird and maximize the consumption of distributed energy to reduce the number and loss of feedback power. The simulation results and experimental data verify the effectiveness of the proposed method and control strategy.