In order to conduct deep theoretical analysis of operating characteristics of microgrids, it is necessary to establish simulation models. By using MATLAB simulation tools, the models of the main micro-sources including photovoltaic arrays and proton exchange membrane fuel cells(PEMFC)are properly built, and with the integration of the model of a single phase grid-connected inverter with deadbeat control, a simple microgrid model is constructed. Simulation results prove the validity of the model.