In Thermal Power Generation and heating Water Treatment process, duo to the water supply pipeline pressure and flow changes, the traditional PID control system controller cannot the prompt track response, PH value of water changes in a larger range, increased damage to the boiler pipes. In order to solve the problem which the control parameters optimizes, improves the system performance, proposed a new Ant colony algorithm PID parameters optimization strategy, this solution can combine characteristics that Ant colony algorithm can fast find the most superior parameter solution stably and PID can precise adjustment. In the control process, taken the PID parameters as a colony of ants, used to control the absolute error integral function as the optimization objective, dynamically adjust the PID control parameters in the control process, so as to realize the PID parameters on-line tuning, to improve real-time of the water treatment control system, improved the stability of the system, and achieve a better control effect.