Abstract:PID algorithm is one of the most classical algorithms in industrial control, and its branches include the location PID, incremental PID and PID based on neural network and genetic algorithm. Aiming at the problem that the influence of various kinds of interference by the work site in actual application makes the differential item very sensitive to data error and interference, four sampling center method is proposed for the error optimization to reduce the sensitivity of the system to interference, and is realized by C language code. Finally, the condusion is reached by analysis using LabVIEW that four samples centers algorithm can effectively reduce the interference of the second order differential item to the PID system,and reduce the impact of system malfunction and ensure system stability, especially in the switching of automatic control to manual control,which can be done seamlessly.