According to the changes in input voltage of the power grid line, a microcomputer (MCU+PLD+12 bit high-speed AD) is used for intelligent detection to convert the analog signal of the changing voltage into a digital signal. The microcomputer processes the data through a pre programmed program and outputs instructions to transmit to the optocoupler control electronic module (IGBT or SCR) for fast switching. The stability of the output voltage is maintained through transformer co frequency, phase-locked, and sine wave superposition compensation.