Five-axis machining path planning method and system based on data driving

By constructing the Jacobian matrix and performing singular value decomposition, the ratio of machine tool kinematic attitude condition number is monitored in real time. The rotary axis motion is optimized using nonlinear mapping functions and weighted damped least squares method. This solves the machine tool vibration and accuracy problems caused by neglecting kinematic performance changes in traditional five-axis machining path planning, and improves the stability and accuracy of five-axis linkage machining.

CN121596831APending Publication Date: 2026-03-03NANTONG JIANGWEI INTELLIGENT TECHNOLOGY CO LTD

Patent Information

Application Number
CN202610129648.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-30
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Traditional five-axis machining path planning methods ignore the instantaneous kinematic performance changes of each motion axis of the machine tool during the actual linkage process. This can lead to the rotary axis performing excessive high-speed motion during the cutting process, causing severe vibration of the machine tool and damaging the quality of the machined surface. It also affects the stability of multi-axis linkage operation and the geometric accuracy of the formed parts during the cutting of complex curved surfaces.

Method used

By constructing the Jacobian matrix and performing singular value decomposition, the condition number ratio of the machine tool's kinematic posture is monitored in real time. The condition number ratio is transformed into a dynamic penalty factor using a nonlinear mapping function. Combined with the weighted damped least squares optimization process, adaptive constraints are applied to the rotary axis motion to suppress the drastic abrupt change behavior of the rotary axis when approaching the singular region, thereby achieving dynamic stability of the five-axis linkage machining process and improving the surface quality of the workpiece.

Benefits of technology

It effectively suppresses the drastic abrupt changes in the rotary axis during five-axis machining, improves the dynamic stability of five-axis linkage machining and the surface quality of the workpiece, and ensures the smoothness and accuracy of the machining process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121596831A_ABST
    Figure CN121596831A_ABST
Patent Text Reader

Abstract

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.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CNC programming technology, and in particular to a data-driven five-axis machining path planning method and system. Background Technology

[0002] The field of CNC programming technology refers to the industrial automation technology that uses computer-aided manufacturing software combined with numerical calculation theory to convert the three-dimensional geometric model of a part into CNC machine tool execution instructions. The traditional five-axis machining path planning method involves process engineers loading the surface model of the part to be machined into computer-aided manufacturing software and setting the tool geometry parameters. Using the isoparametric line method or the driving surface method, a series of discrete tool position points and tool axis vectors are generated on the model surface according to a preset residual height. These tool position files are then converted into G-code text for a specific CNC system through a post-processing program. Finally, this code is input into the machine tool's CNC device to drive the five servo axes to cut the workpiece in a coordinated manner.

[0003] Traditional five-axis machining path planning mainly relies on static geometric models and preset residual heights to generate toolpath trajectories, ignoring the instantaneous kinematic performance changes of each motion axis of the machine tool during actual linkage. The discrete toolpath points based solely on geometric features are converted into fixed commands after post-processing, which cannot perceive the kinematic singularities of the machine tool in specific poses. This leads to the rotary axis often having to perform excessively high-speed motion to compensate for tool tip displacement when the cutting process involves singular regions, causing severe vibration of the machine tool and damaging the surface quality of the machined parts. This restricts the stability of multi-axis linkage operation and the geometric accuracy of the formed parts during the cutting of complex curved surfaces. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and to propose a data-driven five-axis machining path planning method and system.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a data-driven five-axis machining path planning method, comprising the following steps: S1: Obtain the real-time coordinate values ​​of multiple axes of the machine tool, calculate the linear velocity components and angular velocity components generated by the unit motion of multiple motion axes based on the principle of differential transformation, and combine the linear velocity components and the angular velocity components to construct the Jacobian matrix; S2: Perform singular value decomposition on the Jacobian matrix to extract the non-negative diagonal values, filter the maximum and minimum singular values ​​from the non-negative diagonal values, and calculate the ratio of the quotient of the maximum singular value to the minimum singular value as a condition number. S3: Input the condition number ratio into the nonlinear mapping function to calculate the dynamic penalty factor, obtain the preset target rotation axis identifier, establish the mapping relationship between the dynamic penalty factor and the target rotation axis identifier, and generate the rotation axis weighting term; S4: Construct a weighted damped least squares optimization objective function that includes the weighted terms of the rotation axis, calculate the five-axis motion increment value based on the weighted damped least squares optimization objective function, and accumulate the five-axis motion increment value with the real-time coordinate values ​​of multiple axes of the machine tool to generate the target absolute position coordinates.

[0006] As a further aspect of the present invention, step S1 specifically comprises: S11: Read the real-time coordinate values ​​of multiple machine tool axes in the CNC system and the pre-stored machine tool kinematic chain geometric parameters, construct a homogeneous transformation matrix between multiple coordinate systems based on the geometric parameters, and determine the position vector of the tool center point relative to multiple joint coordinate systems; S12: Extract the unit direction vectors of multiple motion axes in the base coordinate system and the spatial position coordinates of multiple joint axes, and determine the angular velocity components based on the unit direction vectors; S13: Using the vector cross product algorithm, calculate the cross product of the unit direction vector and the position vector, and use the cross product as the linear velocity component; S14: According to the physical arrangement order of multiple motion axes, combine the linear velocity components and the angular velocity components column by column to generate a Jacobian matrix.

[0007] As a further aspect of the present invention, step S2 specifically comprises: S21: Call the linear algebra operation library to perform orthogonal matrix decomposition on the Jacobian matrix, decomposing the Jacobian matrix into a left singular vector matrix, a diagonal singular value matrix, and a right singular vector matrix; S22: Traverse the main diagonal elements of the diagonal singular value matrix, extract all real values ​​greater than zero as non-negative diagonal values, and construct a set of singular value values. S23: Perform a bubble sort operation on the set of singular values, select the element with the largest value as the largest singular value, and select the element with the smallest value as the smallest singular value; S24: Perform a division operation to calculate the result of dividing the maximum singular value by the minimum singular value, and generate the condition number ratio.

[0008] As a further aspect of the present invention, step S3 specifically comprises: S31: Obtain the preset sensitivity adjustment coefficient and threshold parameter, substitute the condition number ratio into the nonlinear model based on the exponential function for calculation, and obtain the dynamic penalty factor; S32: Parse the current machining task instructions, identify the key swing axis that is approaching the mechanical limit or causing a singularity change in the current posture, and mark it as the target rotation axis identifier; S33: Construct a diagonal weighted matrix, retrieve the diagonal index position corresponding to the target rotation axis identifier in the matrix, assign the dynamic penalty factor to the index position, and set the remaining diagonal elements in the matrix as basic weight values ​​to generate a rotation axis weighted term.

[0009] As a further aspect of the present invention, step S4 specifically comprises: S41: Obtain the position deviation vector between the theoretical interpolation position and the actual position at the current moment, and combine the Jacobian matrix and the rotation axis weighting term to establish an optimization equation with the goal of minimizing the position tracking error and the joint velocity norm. S42: The optimization equation is differentiated and the extreme value is solved by using the damped least squares method to calculate the joint angular velocity correction and convert it into a five-axis motion increment value. S43: Obtain the real-time coordinate values ​​of multiple axes of the machine tool in the previous interpolation cycle, and vector-superimpose the five-axis motion increment values ​​with the coordinate values ​​to generate the target absolute position coordinates for the next interpolation cycle.

[0010] As a further aspect of the present invention, the calculation process of the linear velocity component includes: Obtain the type identifier of the current motion axis. If the axis is a rotation axis, obtain the unit vector of the rotation axis in the base coordinate system and the relative position vector of the tool tip relative to the origin of the axis. Calculate the vector product of the unit vector of the rotation axis and the relative position vector, and use the result as the linear velocity component of the rotation axis. If the axis is a translation axis, then the unit vector of the translation direction of the axis in the base coordinate system is directly obtained, and the unit vector of the translation direction is directly assigned as the linear velocity component of the translation axis.

[0011] As a further aspect of the present invention, the calculation process of the dynamic penalty factor includes: Obtain the preset adjustment gain constant and attenuation rate parameters, and calculate the dynamic penalty factor using the condition number ratio according to the following formula: ; in, Represents the dynamic penalty factor, This represents the preset amplitude boundary constant. Represents the natural constant. Represents the attenuation rate parameter. Represents the ratio of the condition number. This represents the preset critical threshold parameter.

[0012] As a further aspect of the present invention, the calculation process of the five-axis motion increment value includes: Obtain the position deviation vector and damping coefficient, and calculate the five-axis motion increment using the following formula: ; in, This represents the numerical value of the five-axis motion increment. Represents the Jacobian matrix, The matrix representing the transpose of the Jacobian matrix. Represents the dynamic penalty factor, Represents a diagonal weighted matrix including the rotation axis weighting terms. This represents the position deviation vector.

[0013] As a further aspect of the present invention, the process of generating the target's absolute position coordinates includes: The amplitude of the five-axis motion increment is limited to ensure that the increments of multiple axes do not exceed the maximum acceleration limit of the machine tool servo system. The five-axis motion increment value after the limit is accumulated one axis at a time with the real-time coordinate values ​​of multiple axes of the machine tool in the current cycle, and the accumulated result is compared with the soft limit travel boundary of the machine tool. If it is within the travel range, the absolute position coordinate of the target is output; if it is outside the range, the boundary value is output.

[0014] A data-driven five-axis machining path planning system is provided. This system implements the aforementioned data-driven five-axis machining path planning method. The system includes: The kinematic parameter acquisition and Jacobian construction module is used to acquire real-time coordinate values ​​of multiple axes of the machine tool, calculate the linear velocity components and angular velocity components generated by the unit motion of multiple motion axes based on the principle of differential transformation, and combine the linear velocity components and angular velocity components to construct the Jacobian matrix; The singular value analysis and condition number calculation module is used to perform singular value decomposition on the Jacobian matrix to extract non-negative diagonal values, filter the maximum and minimum singular values ​​from the non-negative diagonal values, and calculate the ratio of the quotient of the maximum and minimum singular values ​​to the condition number. The nonlinear mapping and weighting factor generation module is used to input the condition number ratio into the nonlinear mapping function to calculate the dynamic penalty factor, obtain the preset target rotation axis identifier, establish the mapping relationship between the dynamic penalty factor and the target rotation axis identifier, and generate the rotation axis weighting term. The optimization solution and coordinate generation module is used to construct a weighted damped least squares optimization objective function including the weighted terms of the rotation axis, calculate the five-axis motion increment values ​​based on the weighted damped least squares optimization objective function, and accumulate the five-axis motion increment values ​​with the real-time coordinate values ​​of multiple axes of the machine tool to generate the target absolute position coordinates.

[0015] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, by constructing a Jacobian matrix containing linear velocity and angular velocity components and performing singular value decomposition, the condition number ratio of the machine tool's kinematic posture is monitored in real time to quantify the current pose singularity. The condition number ratio is transformed into a dynamic penalty factor for a specific rotary axis using a nonlinear mapping function. Adaptive constraints are applied to the rotary axis motion during the weighted damped least squares optimization process, effectively suppressing the drastic abrupt change in the rotary axis behavior when approaching the singular region. This ensures that the tool tip trajectory following error is minimized while achieving smooth distribution of motion increments for each axis, thereby improving the dynamic stability and workpiece surface quality during five-axis linkage machining. Attached Figure Description

[0016] Figure 1 This is the main flowchart of the five-axis machining path planning method of the present invention; Figure 2 This is a flowchart of the Jacobian matrix construction process of the present invention; Figure 3 This is a flowchart of the condition number ratio calculation process of the present invention; Figure 4 This is a flowchart illustrating the generation process of the rotation axis weighted terms in this invention. Figure 5 A flowchart for generating the absolute position coordinates of the target in this invention. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the software-based technical solution is described in detail below with reference to system architecture diagrams and embodiments. It should be understood that the specific embodiments described herein are only for explaining the technical solutions of this invention and do not constitute a limitation on the scope of protection.

[0018] In the description of this invention, the system architecture relationships or data processing flows indicated by terms such as "layer," "module," "interface," "data flow," "client," and "server" are all defined based on the architecture diagram or flowchart corresponding to the embodiments. This way of describing is only used to clearly illustrate the logical relationships between the elements in the technical solution, and not to limit the physical deployment form. The term "multiple" includes two or more technical units, including but not limited to multiple data nodes, processing threads, service instances, or functional components and other scalable elements. The specific number is determined according to the actual business scenario and needs to be specifically specified.

[0019] Please see Figure 1 and Figure 2 This invention provides a technical solution: a data-driven five-axis machining path planning method, comprising the following steps: S1: Obtain real-time coordinate values ​​of multiple axes of the machine tool, calculate the linear velocity components and angular velocity components generated by the unit motion of multiple motion axes based on the principle of differential transformation, and construct the Jacobian matrix by combining the linear velocity components and angular velocity components. The specific steps of S1 are as follows: S11: Read the real-time coordinate values ​​of multiple machine tool axes in the CNC system and the pre-stored machine tool kinematic chain geometric parameters, construct the homogeneous transformation matrix between multiple coordinate systems based on the geometric parameters, and determine the position vector of the tool center point relative to multiple joint coordinate systems; S12: Extract the unit direction vectors of multiple motion axes in the base coordinate system and the spatial position coordinates of multiple joint axes, and determine the angular velocity components based on the unit direction vectors; S13: Using the vector cross product algorithm, calculate the cross product of the unit direction vector and the position vector, and use the cross product as the linear velocity component; S14: According to the physical arrangement order of multiple motion axes, combine the linear velocity components and angular velocity components column by column to generate the Jacobian matrix; The calculation process for the linear velocity component includes: Obtain the type identifier of the current motion axis. If the axis is a rotation axis, obtain the unit vector of the rotation axis in the base coordinate system and the relative position vector of the tool tip relative to the origin of the axis. Calculate the vector product of the unit vector of the rotation axis and the relative position vector, and use the result as the linear velocity component of the rotation axis. If the axis is a translation axis, then directly obtain the unit vector of the translation direction in the base coordinate system, and directly assign the unit vector of the translation direction to the linear velocity component of the translation axis.

[0020] The CNC system first initializes the memory area related to machine tool kinematics, establishing an array structure for storing axis coordinate values ​​and geometric parameters. The system periodically scans the encoder feedback register of the underlying servo driver, reading the real-time absolute position values ​​of the three translation axes (X, Y, and Z) and the two rotary axes (A and C). The set of machine tool axis coordinate values ​​at the current sampling moment is then set as follows: Taking a dual-swivel head five-axis machine tool as an example, the real-time coordinate values ​​read by the system are: X-axis coordinates. Y-axis coordinate Z-axis coordinate A-axis swing angle C-axis rotation angle After the read operation is complete, the system retrieves the machine tool kinematic chain geometric parameters pre-stored in non-volatile memory. These parameters describe the physical dimensions and connection relationships between each axis, specifically including the length, offset distance, and torsion angle of each link. Based on the acquired geometric parameters, the system constructs the coordinate system of each joint according to the Denavit-Hartenberg parametric method. For each motion axis... (in From 1 to 5, corresponding to X, Y, Z, A, and C respectively, the system calculates from the joint coordinate system. To the joint coordinate system homogeneous transformation matrix The construction of a homogeneous transformation matrix involves the multiplication of four fundamental transformation matrices: around... Axis rotation Angle, along Axis translation Distance, around Axis rotation Angle, and along Axis translation Distance. The system converts angle values ​​to radians for calculation; the A-axis... Convert to C-axis Convert to By continuously right-multiplying by the transformation matrix of each joint, i.e. The system calculates the pose matrix of the tool center point relative to the machine tool base coordinate system. The elements in the first three rows of the fourth column of this pose matrix are the position vector of the tool center point in the base coordinate system. Simultaneously, the system extracts the intermediate process matrix. The first three rows of the fourth column are used as the first row. The position vector of the origin of the joint coordinate system relative to the base coordinate system The system calculates the spatial coordinates of the rotation center of axis A. Tool center point coordinates Subsequently, the system performs specific calculations for each column of the Jacobian matrix. The system iterates through the five motion axes, identifying the motion type for each axis. For translation axes (X, Y, Z), their contribution to the end-effector linear velocity is directly reflected as a unit vector along the axis direction, with no contribution to angular velocity. The system extracts the transformation matrix. The first three rows of the third column are used as the unit direction vector of that axis in the base coordinate system. For the X-axis in the base coordinate system, its direction vector is... The Y-axis is The Z-axis is These vectors are directly filled into the linear velocity components of the corresponding columns of the Jacobian matrix, while the corresponding angular velocity components are assigned zero vectors. For the rotation axes (A-axis, C-axis), the calculation process is as follows: Taking the A-axis as an example, the system first calculates from the transformation matrix... Extract the first three rows of the third column to obtain the unit vector of the rotation axis of A in the base coordinate system. Assuming the current attitude, the calculated... Next, the system calculates the relative position vector of the tool center point with respect to the origin of the A-axis. .

[0021] Substituting the aforementioned values, .

[0022] The system calls the vector cross product subroutine to calculate... and cross product: .

[0023] The specific calculation is as follows: ; ; .

[0024] Therefore, the linear velocity component generated by axis A is The angular velocity component is taken directly. Similarly, the system performs the same operation on the C-axis, calculating... and Finally, the system, according to the physical axis sequence of the machine tool, perpendicularly concatenates the linear velocity components and angular velocity components calculated for each axis into a 6-dimensional column vector, and generates the vector by column combination. Jacobian matrix The first three rows of the matrix describe the transmission relationship of each axis motion to the linear velocity of the tool tip, and the last three rows describe the transmission relationship to the angular velocity of the tool attitude. The system will construct the Jacobian matrix. Stored in the designated cache area for subsequent use by the singular value decomposition module.

[0025] The homogeneous transformation matrix mentioned above refers to a type widely used in robotics and computer graphics. A matrix can unify rotation, translation, scaling, and projection transformations into a single matrix form, allowing complex coordinate transformations to be achieved through a series of matrix multiplication operations.

[0026] Please see Figure 1 and Figure 3 S2: Perform singular value decomposition on the Jacobian matrix to extract the non-negative diagonal values, select the maximum and minimum singular values ​​from the non-negative diagonal values, and calculate the ratio of the quotient of the maximum and minimum singular values ​​to the condition number of the generation. The specific steps of S2 are as follows: S21: Call the linear algebra operation library to perform orthogonal matrix decomposition on the Jacobian matrix, decomposing the Jacobian matrix into a left singular vector matrix, a diagonal singular value matrix, and a right singular vector matrix; S22: Traverse the main diagonal elements of the diagonal singular value matrix, extract all real values ​​greater than zero as non-negative diagonal values, and construct a set of singular value values. S23: Perform a bubble sort operation on the set of singular values, select the element with the largest value as the largest singular value, and select the element with the smallest value as the smallest singular value; S24: Perform a division operation to calculate the result of dividing the largest singular value by the smallest singular value, and generate the condition number ratio.

[0027] The system reads the data generated in the previous step from the cache. Jacobian matrix Start the singular value decomposition operation module. Due to the Jacobian matrix... For non-square matrices, the system first constructs an auxiliary matrix in the internal working area. The matrix is ​​a The system calls the eigenvalue decomposition function from the linear algebra library to decompose the matrix. Diagonalization is performed, and the characteristic equation is solved. Five eigenvalues ​​were obtained. The system then performs square root operations on these five eigenvalues, using the following formula: Thus, the Jacobian matrix is ​​obtained. The five singular values ​​form a diagonal singular value matrix. The main diagonal elements. For ease of numerical analysis, the system defines a temporary array `SingularValues` to store these 5 non-negative real numbers. Table 1 shows the distribution of singular values ​​of the calculated Jacobian matrix under the current machine tool posture.

[0028] Table 1. Calculation results of singular values ​​of the Jacobian matrix during the current interpolation period.

[0029] Referring to Table 1, the system iterates through the SingularValues ​​array and performs non-zero filtering logic. Although theoretically all singular values ​​are non-negative, extremely small noise values ​​may occur in computer floating-point operations. The system sets a minimum value criterion for judgment. Anything greater than All values ​​are considered valid non-negative diagonal values. In this example, all 5 values ​​are valid. The system then performs a bubble sort algorithm on the array. The algorithm compares adjacent elements and swaps their positions, traversing the array multiple times to sort it in descending order. After sorting, the first element of the array is the largest singular value. The last element of the array is the smallest singular value. The system extracts these two extreme values ​​into a register. Next, the system calculates the condition number ratio. The calculation formula is as follows: Substitute the extracted values ​​into the calculation: The condition number ratio This reflects the ill-conditioned nature of the current Jacobian matrix; a larger value indicates that the matrix is ​​closer to a singular state, meaning the machine tool is more sensitive to errors during inverse kinematics solving and is more prone to generating uncontrollable, extremely high joint velocities. After calculation, the system will generate the condition number ratio. The output is then fed into the subsequent penalty factor calculation module.

[0030] The aforementioned singular value decomposition module refers to the computational unit used to execute the matrix singular value decomposition (SVD) algorithm. This algorithm can decompose any real matrix into the product of a left singular vector matrix, a diagonal singular value matrix, and a right singular vector matrix, thereby revealing the rank and condition number of the matrix in numerical analysis, and decoupling geometric transformations into combinations of rotations, scaling, and re-rotation.

[0031] Please see Figure 1 and Figure 4 S3: Input the condition number ratio into the nonlinear mapping function to calculate the dynamic penalty factor, obtain the preset target rotation axis identifier, establish the mapping relationship between the dynamic penalty factor and the target rotation axis identifier, and generate the rotation axis weighting term; The specific steps for S3 are as follows: S31: Obtain the preset sensitivity adjustment coefficient and threshold parameter, substitute the condition number ratio into the nonlinear model based on the exponential function for calculation, and obtain the dynamic penalty factor; S32: Parse the current machining task instructions, identify the key swing axis that is approaching the mechanical limit or causing a singularity change in the current posture, and mark it as the target rotation axis identifier; S33: Construct a diagonal weighted matrix, retrieve the diagonal index position corresponding to the target rotation axis identifier in the matrix, assign the dynamic penalty factor to the index position, and set the remaining diagonal elements in the matrix to the basic weight value to generate the rotation axis weighted term; The calculation process for the dynamic penalty factor includes: Obtain the preset adjustment gain constant and attenuation rate parameters, and calculate the dynamic penalty factor using the condition number ratio according to the following formula: ; in, Represents a dynamic penalty factor. This represents the preset amplitude boundary constant. Represents the natural constant. Represents the attenuation rate parameter. Represents the ratio of condition numbers. This represents the preset critical threshold parameter.

[0032] The system receives the condition number ratio output from step S2. The system loads preset dynamic adjustment parameters from the parameter database. To calculate the dynamic penalty factor, the system first determines the sensitivity adjustment coefficient and threshold parameters. These parameters are obtained through offline experimental calibration: amplitude boundary constant... Set as This value determines the maximum saturation value of the penalty factor near extreme singularities; decay rate parameter Set as This is used to control the response rate as the penalty factor increases with the condition number; critical threshold parameter. Set as This represents the critical condition number for the machine tool to enter a control region dominated by singularities. The system call calculates the dynamic penalty factor based on a nonlinear model using an exponential function. The calculation formula is as follows: ; in, This represents the dynamic penalty factor, used to adjust the weight of the damping term in the optimization objective function; This represents a preset amplitude boundary constant, which limits the upper limit of the penalty factor; This represents the natural constant, approximately equal to 2.71828; The decay rate parameter controls the steepness of the Sigmoid function curve; This represents the ratio of condition numbers calculated in real time. This represents the preset critical threshold parameter, i.e., the condition number corresponding to the center point of the curve.

[0033] Here, the physical meaning and calculation logic of each parameter in the formula are as follows: The term calculates the degree to which the current condition number exceeds the critical threshold, which in this example is... .

[0034] This difference reflects the specific magnitude of the singularity risk. The term uses the decay rate to scale the difference, resulting in the power of the exponential function, which is calculated as follows: . This term utilizes the properties of the natural exponential function to map the linear difference to... The attenuation coefficient within the interval is calculated to be approximately Denominator Ultimately, the molecule Divide by the denominator to obtain the dynamic penalty factor. . Substitute specific calculation examples: .

[0035] This result indicates that, due to the current condition number The threshold has been exceeded. The system generated a large damping value. This is used to suppress abrupt changes in joint velocity. (Calculation completed) Then, the system parses the current machining task instruction and reads the position feedback of each axis in real time. The system internally stores the mechanical travel limit range of each rotary axis; for example, the limit of axis A is... The system detects the current position of the A-axis as follows: The distance to the limit is relatively far; the C-axis position is It is also within the safe zone. However, the system simultaneously monitors the norm changes of each column vector in the Jacobian matrix and identifies that the magnitude of the column vector corresponding to the C-axis decreases sharply under the current attitude, indicating that the C-axis is the key oscillation axis causing the singularity. The system marks the C-axis as the target rotation axis identifier, denoted as Axis_ID=5. Finally, the system constructs a... diagonal weighted matrix Initially, the five elements on the main diagonal of the matrix are all set to their basic weight values. The system locates the diagonal index position in the 5th row and 5th column of the matrix based on the retrieved target rotation axis identifier (Axis_ID=5). The system then calculates the dynamic penalty factor. The value is assigned to that position. At this point, the weighted matrix... The diagonal element sequence is This matrix is ​​the generated rotation axis weighting term. In subsequent optimization, it will force the motion increment of the C-axis to be significantly "penalized" and suppressed, thereby prioritizing the compensation of position errors through the motion of other axes.

[0036] The aforementioned dynamic penalty factor refers to a scalar coefficient that changes in real time in numerical optimization or control algorithms based on the stability of the current system state or the degree of constraint violation. It is used to adjust the weight of the penalty term in the objective function, thereby preventing drastic oscillations in the system output while ensuring the accuracy of the solution.

[0037] Please see Figure 1 and Figure 5S4: Construct a weighted damped least squares optimization objective function that includes a weighted term for the rotation axis, calculate the five-axis motion increment value based on the weighted damped least squares optimization objective function, and accumulate the five-axis motion increment value with the real-time coordinate values ​​of multiple axes of the machine tool to generate the target absolute position coordinates; The specific steps for S4 are as follows: S41: Obtain the position deviation vector between the theoretical interpolation position and the actual position at the current moment, and combine the Jacobian matrix and the rotation axis weighting term to establish an optimization equation with the goal of minimizing the position tracking error and the joint velocity norm. S42: The optimization equation is differentiated and the extreme value is solved by using the damped least squares method to calculate the joint angular velocity correction and convert it into a five-axis motion increment value. S43: Obtain the real-time coordinate values ​​of multiple axes of the machine tool in the previous interpolation cycle, and vector-superimpose the five-axis motion increment values ​​with the coordinate values ​​to generate the target absolute position coordinates for the next interpolation cycle. The calculation process for the five-axis motion increment includes: Obtain the position deviation vector and damping coefficient, and calculate the five-axis motion increment using the following formula: ; in, Represents the incremental values ​​of five-axis motion. Represents the Jacobian matrix. The matrix representing the transpose of the Jacobian matrix. Represents a dynamic penalty factor. This represents a diagonal weighted matrix that includes rotation axis weighting terms. Represents the position deviation vector; The process of generating the target's absolute position coordinates includes: The amplitude of the five-axis motion increment is limited to ensure that the increments of multiple axes do not exceed the maximum acceleration limit of the machine tool servo system. The five-axis motion increment value after the limit is accumulated one axis at a time with the real-time coordinate values ​​of multiple axes of the machine tool in the current cycle, and the accumulated result is compared with the soft limit travel boundary of the machine tool. If it is within the travel range, the target absolute position coordinate is output; if it is outside the range, the boundary value is output.

[0038] The system enters the motion increment solution and position update stage, which aims to transform the position error in Cartesian space into motion commands in five-axis joint space.

[0039] First, the system obtains the coordinates of the theoretical interpolation point position for the current interpolation cycle. Coordinates of the current actual tool position .

[0040] Assumption Combined with the actual position calculated in S1 The system calculates the position deviation vector. .

[0041] Meanwhile, considering attitude error, we assume that the attitude error components are... The constructed 6-dimensional generalized error vector .

[0042] The system constructs an optimization objective function based on the weighted damped least squares method, which has the following form: .

[0043] To find the solution that minimizes this function The system performs matrix operations according to the following formula: ; in, This represents the numerical value of the five-axis motion increment to be solved, that is, the change in position of each axis in the current cycle; This represents the Jacobian matrix generated in S1; The matrix representing the transpose of the Jacobian matrix; This represents the dynamic penalty factor calculated in S3; This represents the diagonal weighted matrix constructed in S3, including the rotation axis weighting terms; Represents the transpose of the weighted matrix; Represents the position deviation vector; This represents the matrix inversion operation.

[0044] In this formula: By multiplying the transpose of the Jacobian matrix by itself, we obtain... The Hessian approximation matrix, this step establishes the basis for the mapping from joint velocity to Cartesian velocity; The term introduces a damping effect, in which This is the diagonal weighted matrix generated in S3. This is a dynamic penalty factor. Its function is to... As it approaches singularity, by superimposing values ​​on the diagonal, it is ensured that... This overall matrix always maintains good positive definiteness and invertibility. The term maps the error gradient in Cartesian space back to the joint space direction. The system substitutes specific numerical values ​​into the calculation: first, it calculates... Next, the damping term matrix is ​​calculated. .because It is a diagonal matrix, and the diagonal elements are... ,but diagonal is Multiply by Subsequently, the damping term corresponding to the C-axis becomes extremely large, significantly increasing the "cost" of C-axis motion. System calculations The inverse matrix, and left-multiplied Finally, the five-axis motion increment values ​​were obtained. Assume the calculation result is (Units are mm and rad respectively). It can be seen that due to the strong damping effect, The value is very small compared to other axes, which is a result of the algorithm suppressing singular axis motion. Finally, the system generates the target's absolute position coordinates. First, for... Amplitude limiting is performed. The system reads the servo system's maximum acceleration and interpolation period (e.g., 1ms) and calculates the maximum allowable increment for each axis. It is assumed that all axes are within limits. The system then retrieves the machine tool axis coordinates from the previous cycle. .

[0045] Perform vector overlay: .

[0046] The calculation yields: ; ; ; ; .

[0047] The system compares the result with the soft limit boundary, and after confirming that it is within the stroke range, it will... The target absolute position coordinates are output to the servo drive unit as the target position coordinates for the next interpolation cycle, driving the motor to perform the motion.

[0048] The aforementioned weighted damped least squares method is an improved algorithm of the standard least squares method. It introduces a regularization term (damping term) with a weight matrix into the objective function of minimizing the sum of squared errors to solve the ill-conditioned problem in the matrix inversion process, and selectively constrains the solution space magnitude of specific variables by adjusting the weight matrix.

[0049] A data-driven five-axis machining path planning system is provided. This system is used to execute the aforementioned data-driven five-axis machining path planning method. The system includes: The kinematic parameter acquisition and Jacobian construction module is used to acquire real-time coordinate values ​​of multiple axes of the machine tool, calculate the linear velocity components and angular velocity components generated by the unit motion of multiple motion axes based on the principle of differential transformation, and construct the Jacobian matrix by combining the linear velocity components and angular velocity components. The Singular Value Analysis and Condition Number Calculation module is used to perform singular value decomposition on the Jacobian matrix to extract the non-negative diagonal values, filter the maximum and minimum singular values ​​from the non-negative diagonal values, and calculate the ratio of the quotient of the maximum and minimum singular values ​​to generate the condition number. The nonlinear mapping and weighting factor generation module is used to input the condition number ratio into the nonlinear mapping function to calculate the dynamic penalty factor, obtain the preset target rotation axis identifier, establish the mapping relationship between the dynamic penalty factor and the target rotation axis identifier, and generate the rotation axis weighting term. The optimization solution and coordinate generation module is used to construct a weighted damped least squares optimization objective function that includes a rotation axis weighting term. Based on the weighted damped least squares optimization objective function, the module calculates the five-axis motion increment values ​​and accumulates the five-axis motion increment values ​​with the real-time coordinate values ​​of multiple machine tool axes to generate the target absolute position coordinates.

[0050] The above embodiments illustrate preferred embodiments of the present invention. Any equivalent adjustments to the technical solution based on software engineering methods are within the scope of protection, including but not limited to: implementing algorithm logic using different programming languages, refactoring functional modules into services, adjusting data interaction protocols, and optimizing resource scheduling strategies. Any implementation scheme derived from reasonable modifications to the data processing flow, service call chain, or system architecture layer without departing from the core technology of the present invention should be considered within the scope of protection of the present invention.

Claims

1. A data-driven five-axis machining path planning method, characterized in that, Includes the following steps: S1: Obtain the real-time coordinate values ​​of multiple axes of the machine tool, calculate the linear velocity components and angular velocity components generated by the unit motion of multiple motion axes based on the principle of differential transformation, and combine the linear velocity components and the angular velocity components to construct the Jacobian matrix; S2: Perform singular value decomposition on the Jacobian matrix to extract the non-negative diagonal values, filter the maximum and minimum singular values ​​from the non-negative diagonal values, and calculate the ratio of the quotient of the maximum singular value to the minimum singular value as a condition number. The specific steps of S2 are as follows: S21: Call the linear algebra operation library to perform orthogonal matrix decomposition on the Jacobian matrix, decomposing the Jacobian matrix into a left singular vector matrix, a diagonal singular value matrix, and a right singular vector matrix; S22: Traverse the main diagonal elements of the diagonal singular value matrix, extract all real values ​​greater than zero as non-negative diagonal values, and construct a set of singular value values. S23: Perform a bubble sort operation on the set of singular values, select the element with the largest value as the largest singular value, and select the element with the smallest value as the smallest singular value; S24: Perform a division operation to calculate the result of dividing the maximum singular value by the minimum singular value and generate the condition number ratio; S3: Input the condition number ratio into the nonlinear mapping function to calculate the dynamic penalty factor, obtain the preset target rotation axis identifier, establish the mapping relationship between the dynamic penalty factor and the target rotation axis identifier, and generate the rotation axis weighting term; The specific steps in S3 are as follows: S31: Obtain the preset sensitivity adjustment coefficient and threshold parameter, substitute the condition number ratio into the nonlinear model based on the exponential function for calculation, and obtain the dynamic penalty factor; S32: Parse the current machining task instructions, identify the key swing axis that is approaching the mechanical limit or causing a singularity change in the current posture, and mark it as the target rotation axis identifier; S33: Construct a diagonal weighted matrix, retrieve the diagonal index position corresponding to the target rotation axis identifier in the matrix, assign the dynamic penalty factor to the index position, and set the remaining diagonal elements in the matrix to basic weight values ​​to generate rotation axis weighted terms; S4: Construct a weighted damped least squares optimization objective function that includes the weighted terms of the rotation axis, calculate the five-axis motion increment value based on the weighted damped least squares optimization objective function, and accumulate the five-axis motion increment value with the real-time coordinate values ​​of multiple axes of the machine tool to generate the target absolute position coordinates.

2. The data-driven five-axis machining path planning method according to claim 1, characterized in that, The specific steps of S1 are as follows: S11: Read the real-time coordinate values ​​of multiple machine tool axes in the CNC system and the pre-stored machine tool kinematic chain geometric parameters, construct a homogeneous transformation matrix between multiple coordinate systems based on the geometric parameters, and determine the position vector of the tool center point relative to multiple joint coordinate systems; S12: Extract the unit direction vectors of multiple motion axes in the base coordinate system and the spatial position coordinates of multiple joint axes, and determine the angular velocity components based on the unit direction vectors; S13: Using the vector cross product algorithm, calculate the cross product of the unit direction vector and the position vector, and use the cross product as the linear velocity component; S14: According to the physical arrangement order of multiple motion axes, combine the linear velocity components and the angular velocity components column by column to generate a Jacobian matrix.

3. The data-driven five-axis machining path planning method according to claim 1, characterized in that, The specific steps of S4 are as follows: S41: Obtain the position deviation vector between the theoretical interpolation position and the actual position at the current moment, and combine the Jacobian matrix and the rotation axis weighting term to establish an optimization equation with the goal of minimizing the position tracking error and the joint velocity norm. S42: The optimization equation is differentiated and its extreme value is solved by using the damped least squares method to calculate the joint angular velocity correction and convert it into a five-axis motion increment value. S43: Obtain the real-time coordinate values ​​of multiple axes of the machine tool in the previous interpolation cycle, and vector-superimpose the five-axis motion increment values ​​with the coordinate values ​​to generate the target absolute position coordinates for the next interpolation cycle.

4. The data-driven five-axis machining path planning method according to claim 1, characterized in that, The calculation process for the linear velocity component includes: Obtain the type identifier of the current motion axis. If the axis is a rotation axis, obtain the unit vector of the rotation axis in the base coordinate system and the relative position vector of the tool tip relative to the origin of the axis. Calculate the vector product of the unit vector of the rotation axis and the relative position vector, and use the result as the linear velocity component of the rotation axis. If the axis is a translation axis, then the unit vector of the translation direction of the axis in the base coordinate system is directly obtained, and the unit vector of the translation direction is directly assigned as the linear velocity component of the translation axis.

5. The data-driven five-axis machining path planning method according to claim 1, characterized in that, The calculation process of the dynamic penalty factor includes: Obtain the preset adjustment gain constant and attenuation rate parameters, and calculate the dynamic penalty factor using the condition number ratio according to the following formula: ; in, Represents the dynamic penalty factor, This represents the preset amplitude boundary constant. Represents the natural constant. Represents the attenuation rate parameter. Represents the ratio of the condition number. This represents the preset critical threshold parameter.

6. The data-driven five-axis machining path planning method according to claim 1, characterized in that, The calculation process for the five-axis motion increment includes: Obtain the position deviation vector and damping coefficient, and calculate the five-axis motion increment using the following formula: ; in, This represents the numerical value of the five-axis motion increment. Represents the Jacobian matrix, The matrix representing the transpose of the Jacobian matrix. Represents the dynamic penalty factor, Represents a diagonal weighted matrix including the rotation axis weighting terms. This represents the position deviation vector.

7. The data-driven five-axis machining path planning method according to claim 1, characterized in that, The process of generating the absolute position coordinates of the target includes: The amplitude of the five-axis motion increment is limited to ensure that the increments of multiple axes do not exceed the maximum acceleration limit of the machine tool servo system. The five-axis motion increment value after the limit is accumulated one axis at a time with the real-time coordinate values ​​of multiple axes of the machine tool in the current cycle, and the accumulated result is compared with the soft limit travel boundary of the machine tool. If it is within the travel range, the absolute position coordinate of the target is output; if it is outside the range, the boundary value is output.

8. A data-driven five-axis machining path planning system, characterized in that, The system is used to implement the data-driven five-axis machining path planning method according to any one of claims 1-7, and the system includes: The kinematic parameter acquisition and Jacobian construction module is used to acquire real-time coordinate values ​​of multiple axes of the machine tool, calculate the linear velocity components and angular velocity components generated by the unit motion of multiple motion axes based on the principle of differential transformation, and combine the linear velocity components and angular velocity components to construct the Jacobian matrix; The singular value analysis and condition number calculation module is used to perform singular value decomposition on the Jacobian matrix to extract non-negative diagonal values, filter the maximum and minimum singular values ​​from the non-negative diagonal values, and calculate the ratio of the quotient of the maximum and minimum singular values ​​to the condition number. The nonlinear mapping and weighting factor generation module is used to input the condition number ratio into the nonlinear mapping function to calculate the dynamic penalty factor, obtain the preset target rotation axis identifier, establish the mapping relationship between the dynamic penalty factor and the target rotation axis identifier, and generate the rotation axis weighting term. The optimization solution and coordinate generation module is used to construct a weighted damped least squares optimization objective function including the weighted terms of the rotation axis, calculate the five-axis motion increment values ​​based on the weighted damped least squares optimization objective function, and accumulate the five-axis motion increment values ​​with the real-time coordinate values ​​of multiple axes of the machine tool to generate the target absolute position coordinates.

Citation Information

Patent Citations

  • Five-axis curved surface machining path planning method based on differential vector optimization

    CN113341876A

  • Self-adaptive damping matrix least square five-axis machine tool singularity avoidance method

    CN116304510A

  • General post-processing method for five-axis numerical control machine tool based on singular compensation

    CN116400646A

  • Five-axis machining cutter location linear interpolation optimization control method

    CN120762348A

  • Six-axis mechanical arm singularity avoidance control method and device based on virtual seven degrees of freedom

    CN121361081A

Cited By

  • Workpiece dynamic locating method and system for machining connecting rod of overhead working truck

    CN121973021A

  • Workpiece dynamic positioning method and system for high-altitude operation vehicle connecting rod machining

    CN121973021B

  • Mechanical arm laser processing process control method and system based on laser signal feedback

    CN122275017A

  • Mechanical arm laser processing process control method and system based on laser signal feedback

    CN122275017B