The high-precision feed control of CNC machine tools generally adopts an AC servo system driven by a permanent magnet synchronous motor. This paper first establishes a mathematical model for the system, and then uses SOA optimization algorithm, PSO optimization algorithm and GA genetic algorithm to tune the system PID parameters, and finally compares the advantages and disadvantages of SOA algorithm in PID parameter optimization.