In this paper,the open loop response curve is computed by a computer after the process paramter estimatio The parameters of PI or PID controller are computed by the method of respose curve. Then in order to obtain better control performance, the parameters of PI or PID controller are gradually optimized.This algorithm is with wider application range compared with the other self-tuning PID control algorithms. The computer simulation and real-time control trials shows a good result.