To improve computational efficiency of the electromagnetic transient simulations of distributed generation systems and microgrids,a piecewise averaged model of pulse width modulation(PWM)converters based on the averaging theory of nonlinear dynamic systems is proposed.The local averaged state equation for PWM converters in each switching period is derived.It converts the switching functions into piecewise constant functions.Then large integral time step can be chosen to speed up the simulations.Error estimation theorem for the proposed model is provided and the approximate expression of state variable ripple is given as well.The proposed model is verified by simulating a three-phase PWM AC-DC converter.