The economic dispatch of power system can be divided into static dispatch and dynamic dispatch. Static economic dispatch determines the priority and operation mode of the power generating equipment based on the operating conditions of the system in each independent period. Dynamic economic dispatch of a microgrid is better suited to the requirements of a system in actual operation because it not only considers the lowest cost in a scheduling cycle but also coordinates between different distribution generations (DGs) over many periods. So, it is very significant to research the dynamic economic dispatch of a microgrid. Since wind energy and solar energy are subject to random variations and intervals, there is great difficulty in solving the dynamic economic dispatch. In this project, the Matlab design based on combined heat and power (CHP) microgrid system which includes wind turbines (WT), photovoltaic arrays (PV), diesel engines (DE), a micro-turbine (MT), a fuel cell (FC) and a battery (BS). Comprehensively considering the operation cost and the pollutant treatment cost of the microgrid system, we choose the maximum comprehensive benefits as the objective function for the dynamic economic dispatch. At the same time, we establish the spinning reserve probability constraints of the microgrid considering the influence of uncertainty factors such as the fluctuation of the renewable energy, load fluctuation error, and fault shutdown of the unit. Three different operation scheduling strategies under grid-connected mode and island mode of the microgrid. Cuckoo Search optimization algorithm is used to solve the objective function.

**Key Design Points:**

• Objective function based on equation 10

• Constraints based on equation 11 to equation 17

• Cost parameters of the DGs based on Table 1.

• Parameters of the pollutant discharge coefficient and the treatment cost of the pollutant based on Table 2.

• Parameters DGs in microgrid based on table 3.

1. Scheduling strategy 1- The microgrid cannot output power to the grid. The DGs are priority scheduled. When they cannot meet the load demand, the microgrid system will purchase power from the grid.

2. Scheduling strategy 2- The microgrid still cannot output power to the grid. The grid and the microgrid both participate in economic operation. If the cost of power generation of the DGs is cheaper, the DGs will receive priority scheduling. If the cost of power generation of the DGs is more expensive, the microgrid will absorb power from the grid.

3. Scheduling strategy 3- The grid and the microgrid both participate in economic operation. And the grid and the microgrid can freely exchange power. If the cost of power generation of the DGs is higher than the purchasing cost, the DGs will be given priority. If the cost of power generation of the DGs is less than the purchasing cost, the grid will be given priority in the scheduling. And the microgrid can also sell redundant power to the grid in order to obtain profits.