With the increase of the scale of power systems and the access of new power electronic devices, digital simulation of systems has become more complex. The importance of power system simulation to the development of power systems has become more prominent, and it has become the tools for the research and planning of power systems. This paper first introduces the research status of power system simulation analysis methods; then analyzes the mathematical models of network components such as inductors, capacitors and transformers, and obtains the calculation expression after the difference of each component model; finally, by writing C++ program, the first order The circuit and the second-order circuit are simulated by the transient process, and the time-domain curves of the transient voltage and current under different circuits are obtained. By comparing with the theoretical results, the accuracy of the simulation results and the feasibility of using the digital simulation to analyze the system were confirmed.