In this paper, the particle swarm optimization (PSO) algorithm and genetic algorithm (GA) are employed to optimize the parameters of PID algorithm in order to improve the performance of PID control system. Moreover, we propose the grey model based on grey system theory to combine with PID control to establish the PID prediction control system. The proposed control system can realize the accurate control in real-time. Finally, we validated the effectiveness of the proposed control system by computer simulation.