With the application of distributed power sources, power electronic transformer (PET) that can be connected to DC and AC power grids has attracted much attention. This article will design a PET and simulate its performance when it is connected to the grid.PET consists of three inverters. This article will design and simulate AC-DC and DC-AC inverters, and analyze their principles and performance. Then three inverters are combined into PET, so that the conversion performance of PET to voltage can be simulated and evaluated.