The invention relates to the technical field of
numerical control programming, in particular to a five-axis
machining path
planning method and
system based on data driving, and the method comprises the following steps: obtaining real-time coordinates of each axis of a
machine tool, calculating linear velocity and
angular velocity components to construct a Jacobian matrix, executing
singular value decomposition, and calculating a conditional number ratio by using maximum and minimum singular values; and inputting a nonlinear mapping function to calculate a dynamic
penalty factor, generating a rotating shaft weighted item in combination with a rotating shaft identifier, constructing a weighted damping least square objective function, calculating a five-axis motion increment, and accumulating the five-axis motion increment with a real-time coordinate to generate a target absolute position coordinate. According to the method, the
pose singularity degree is quantified by monitoring the
machine tool
pose condition number ratio and converted into the dynamic
penalty factor to apply the self-adaptive constraint to the rotating shaft, the severe sudden change of the rotating shaft in the singularity area is inhibited, the tool
nose track following error is minimized, and meanwhile smooth distribution of the motion increment is achieved; and the dynamic stability and the surface quality of five-axis linkage
machining are improved.