In this paper, a new particle swarm optimization algorithm, adaptive particle swarm optimization (APSO) algorithm, is proposed to optimize the stability and setting time of the fourth generation grate cooler scraper during speed regulation. This algorithm replaces the compression factor with the time varying parameter by using the dynamic variation of the time varying parameters of the traditional PSO algorithm. At the same time, it is proved that the new PSO algorithm in this paper has faster convergence speed and higher efficiency than traditional PSO algorithm. Finally, algorithm is applied to the simulation of electro-hydraulic servo system of grate cooler, and good control effect is achieved.