With the development of the economy, the electricity demand is also increasing. However, the traditional micropower supply bears the problems of excessive load growth and unstable voltage. Therefore, this paper takes power generation as the research object. First, the principle of output optimization based on schedulability, reserve capacity, and intermittent operation frequency of units is analyzed. Then, the relationship between the optimal solution and the minimum power consumption time is calculated by establishing a mathematical model to solve the algorithm, and the difference between the two results is compared. Finally, the power system is simulated on Matlab software, and the method and effect are verified by numerical simulation. The simulation results show that with the same microgrid power configuration, there is a 3.5% load transfer at time-sharing prices and a 6.4% load transfer at real-time prices through price-based demand response. The optimization objective of demand response, namely the cumulative sum of the difference between new energy power generation and load, is 15312 kW · h per year when the fixed price is implemented, 54134 kW · h is for the time of use price, and 451645 kW · h is for real-time price. The response effect of real-time price is optimal.