In view of the problem of optimal operation of microgrid system, a mathematical model of economic optimal dispatch of microgrid was established in this paper, aiming at the lowest cost of generating electricity of distributed generation, operation and maintenance of corresponding equipment, and the lowest price of purchasing and selling electricity from large power grid. And the three kinds of operation scheduling under different weather conditions (normal, cloudy, sunny) were analyzed respectively. Finally, improved particle swarm optimization (iPSO) algorithm was improved to optimize the scheduling under the constraints of not only load requirements, but also generation and output constraints, energy storage unit operation constraints and interactive energy with large power grids.The results show that the proposed control strategy can effectively achieve the optimal power distribution of microgrid and minimize the operation cost. , 2 , 3 are the weight ratios of cost, pollution gas penalty cost and operation and