In order to meet the needs of fast and precise simulation and control analysis of the microgrid with unbalanced grid voltage, a dynamic phasor which is based on time-varying Fourier series is presented in this paper. By obtaining the first order dynamic phasor of the positive and negative sequence components respectively,the caculation of the model is significantly reduced by omiting the use of 2-octave filter.The dynamic phasor model and electromagnetic transient model of grid-connected inverter with unbalanced grid voltage are established.By comparing the simulation result of the two models,the correctness and effectiveness of the dynamic phasor model is demonstrated,which providing a new method for the analysis and control of the unbalanced operation of grid-connected inverter and microgrid.