Abstract:
In this paper, a geometric error compensation method for CNC machine tools based on particle swarm optimization (PSO) algorithm is proposed. The accuracy of CNC machine tools is improved by optimizing the NC code of the workpiece. Firstly, by fitting the measurement error data, the optimal polynomial of the basic error term of each axis is established. The polynomial constant term is set to 0 according to the error definition, and the best polynomial fitting order is determined by the F test. Secondly, using the forward and inverse kinematics of the machine tool to establish the bidirectional conversion between the tool pose and the NC code, the NC code is generated by the post processor of the SmartCNC500_DRTD five-axis machine tool, and the tool pose of the ideal NC code is introduced into the geometric error model to establish the mathematics expression. Finally, an optimization method based on PSO algorithm is proposed. The particle is defined as the tool pose, the initial particle is generated around the ideal tool pose, and the particle moving method is improved to avoid local optimum. The workpiece cutting experiment shows that the method can obtain better NC code, improve the machining accuracy of the machine tool, and verify the feasibility and effectiveness of the method.