A five-axis numerical control machine tool general post-processing method based on singular compensation

By establishing a five-axis screw kinematic model and a singular compensation method based on cubic B-spline interpolation, the singularity problem in the machining process of five-axis CNC machine tools is solved, enabling efficient and precise machining of five-axis machine tools with arbitrary structures and avoiding abrupt changes in rotation axis angles and nonlinear errors.

CN116400646BActive Publication Date: 2026-03-03NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202310429942.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-20
Publication Date
2026-03-03
Estimated Expiration
2043-04-20

AI Technical Summary

Technical Problem

Existing five-axis CNC machine tools have unusual problems during the machining process, resulting in low machining accuracy. Furthermore, existing optimization methods cannot be applied to five-axis machine tools with arbitrary structures, and may affect machining speed and the smoothness of the speed curve of the rotary axes while ensuring machining accuracy.

Method used

A general post-processing method for five-axis CNC machine tools based on singular compensation is adopted. By establishing a five-axis screw kinematic model, using weight functions for multi-solution programming, and combining cubic B-spline interpolation, error compensation in singular regions is performed. This method is applicable to five-axis machine tools with arbitrary structures.

Benefits of technology

It enables efficient machining of five-axis machine tools with arbitrary structures, avoids abrupt changes in rotary axis angles, improves machining accuracy, and optimizes the speed planning of the rotary axis through cubic B-spline compensation, thereby reducing nonlinear errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116400646B_ABST
    Figure CN116400646B_ABST
Patent Text Reader

Abstract

The application belongs to the field of computer numerical control processing, and discloses a general post-processing method of a five-axis numerical control machine tool based on singularity compensation, which comprises the following steps: a general five-axis numerical control machine tool kinematics inverse solution model is established based on a screw, a machine tool type is input, and kinematics inverse solution is acquired; initial numerical control data is calculated according to the value range of the rotating shaft of the machine tool and a multi-solution planning scheme; whether compensation is needed is analyzed by calculating the interpolation sweep error area corresponding to the tool position data and the initial numerical control data; the motion mode corresponding to the singularity type between two adjacent tool positions is judged; different processing schemes are determined for different singularity types, and a cubic B-spline interpolation strategy is adopted for the rotating shaft that needs interpolation; spline interpolation is performed, the boundary slope of the interpolation interval of the rotating shaft value is calculated first, and the final minimum interpolation point number is determined by continuously calculating the sweep error area to acquire the final numerical control data; and the application is suitable for singularity interpolation and post-processing of numerical control machine tools with different parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer numerical control machining, and more specifically, relates to a general post-processing method for five-axis CNC machine tools based on singular compensation. Background Technology

[0002] Currently, five-axis milling is widely used in the production of complex workpieces in the aerospace, automotive and shipbuilding industries. Its processing requirements are also getting higher and higher. General post-processing is one of the core technologies to ensure intelligent production of various CNC machine tools, while singular problems are also one of the key issues affecting the accuracy of five-axis machining.

[0003] For autonomous post-processing of five-axis CNC machine tools, kinematic forward and inverse kinematic models are generally constructed based on the machine tool's kinematic chain. CN102269984B analyzes tool position data statements and uses the minimum rotation method to select suitable solutions. CN103592888B constructs a machine tool inverse kinematic model for a five-axis gantry-type double-swivel head machine tool using a homogeneous transformation matrix and uses the minimum C-axis motion to select solutions for post-processing. CN105204430B proposes a post-processing flow scheme for the machine tool solid model and optimizes it for tool interference. CN105302070B, for five-axis machine tools with non-orthogonal swivel head rotary tables, forms constraints based on the parameters of each axis and uses homogeneous transformation to achieve machine tool inverse kinematics. CN108549319B, for five-axis CNC machine tools with double rotary tables, establishes the machine tool kinematic chain, uses a homogeneous transformation matrix to achieve machine tool inverse kinematics, and uses the minimum C-axis motion to select solutions. CN108549323B addresses five-axis orthogonal grinding machines by employing a homogeneous transformation matrix to achieve inverse kinematics, and then adjusting the post-processing based on the actual motion direction of the grinding machine.

[0004] In summary, autonomous post-processing for five-axis machine tools mostly employs homogeneous transformation matrices to construct inverse kinematics solutions for one of the orthogonal dual-rotary-table, rotary-head, or dual-rotary-head type five-axis machine tools, or for non-orthogonal five-axis machine tools. This means that it cannot achieve a universal inverse kinematics solution model that includes both orthogonal and non-orthogonal machine tools, which is a problem that needs to be optimized.

[0005] Currently, there are mainstream optimization methods for five-axis machining singularities, such as tool axis vector optimization, interpolation optimization, and part clamping optimization.

[0006] Regarding tool axis vector optimization, CN105717874B optimizes the tool axis endpoint vector within its domain, minimizing the angle θ between the projections of the tool axis start vector and the tool axis end vector onto a plane with the polar axis as the normal vector. This reduces the motion of the machine tool's first rotary axis, thus optimizing singular tool axis vectors. CN103926873B determines the presence of singularities by detecting whether the tool axis direction curve of the tool path on the part surface intersects with the taper circle. It avoids singular regions by translating the direction curve while maintaining the tool tip coordinate position to reduce machining errors. CN106843144B projects the CNC data's tool axis vector onto a unit sphere and determines the presence of singularities by judging whether the tool axis vector's endpoint curve passes through a singular circle. It then uses quaternions and B-splines to integrate and adjust the data to avoid singular circles, thus achieving singular avoidance in subsequent processes.

[0007] In terms of interpolation optimization, CN102528554B uses the Jacobian matrix to identify singular boundaries and performs midpoint interpolation on the C-axis within singular regions. It iterates by setting C = (C1 + C2) / 2, ensuring that the nonlinear error between any CNC data remains within the target range. CN103163830B reduces nonlinear errors by replacing the zero vector with the next or previous tool axis vector and performing several touchpoint interpolations on the current data after the replacement, while also maintaining machining speed. CN102566494B determines singularity by checking if the angle between the tool axis vectors of two adjacent APT data sets is greater than a set value. It then fits the tool axis vectors to fifth-order polynomial curves at singular locations and performs inverse kinematics on the discrete tool axis vectors to achieve interpolation, reducing singular errors while ensuring smooth tool vector transitions. CN103801982B determines the existence of singularities by analyzing whether the value of the Z-axis component k in the tool axis vector is greater than a set value. It performs midpoint vector interpolation on tool axis vectors with singularities, performs midpoint linear interpolation on the tool tip position, and performs iterative interpolation in combination with nonlinear error to control the overall error.

[0008] In terms of part clamping optimization, CN110362039B extracts the tool axis vector from the APT data and projects it onto the surface of a unit sphere, calculates the boundary curves of discrete points and biases the boundary curves, and sets an optimization function to optimize the clamping posture of the part.

[0009] In summary, regarding the optimization of singularities in five-axis machining, while tool axis vector optimization can avoid singularities by adjusting local tool axis vectors, this adjustment process typically involves constraints such as the tool axis vector angle. It lacks mandatory constraints on the ultimately significant tool tip nonlinear error, resulting in poor accuracy controllability and an inability to flexibly adjust according to error accuracy requirements. Part clamping, although it can avoid singularities for certain parts by optimizing the clamping posture, generally requires specific fixtures, is suitable for dedicated parts or processes, has a high barrier to entry, and lacks versatility. Interpolation optimization reduces nonlinear errors by interpolating CNC data, and the accuracy of tool tip nonlinear errors can be adjusted as needed. However, conventional linear interpolation methods for rotary axes may lead to reduced machining speed and uneven speed curves, leaving room for optimization. Furthermore, setting error constraints during interpolation typically involves tool axis vector angle error and tool tip position offset difference. Achieving a balance between these two factors—optimizing the overall tool posture while satisfying singularity errors to minimize overcutting and undercutting effects—is a pressing issue that needs to be addressed. Summary of the Invention

[0010] To address the aforementioned technical problems, the present invention aims to provide a universal post-processing method for five-axis CNC machine tools based on singularity compensation. This invention is applicable to five-axis machine tools of any structure and can achieve error compensation in singular regions. It is suitable for any process toolpath of conventional curved surface workpieces and can ensure efficient machining of five-axis machine tools.

[0011] To address the problems existing in five-axis post-processing and singular processing, the present invention adopts the following technical solution:

[0012] A general post-processing method for five-axis CNC machine tools based on singularity compensation includes the following steps:

[0013] S1. Establish a general kinematic model for a five-axis CNC machine tool using five-axis screw motion, including forward kinematics and inverse kinematics; input the machine tool structure type parameters to obtain the inverse kinematics solution model;

[0014] S2. Based on the general multi-solution programming of five-axis CNC machine tool kinematics, combined with APT data, calculate the preliminary CNC data (i.e. NC data);

[0015] S3. Iterate through and calculate the sweep error area of ​​the preliminary CNC data, and determine whether the current data needs singular interpolation.

[0016] S4. Perform singularity analysis on the CNC data that requires singular interpolation to determine the singularity type of the current data;

[0017] S5. For different singular types of data to be interpolated, determine the corresponding interpolation object and method, perform cubic B-spline interpolation on the required rotation axis values, and obtain the final CNC data.

[0018] In some exemplary embodiments, in S1, establishing a general kinematic model of a five-axis CNC machine tool using five-axis spin includes: establishing a general positive kinematic model of the five-axis using the homogeneous transformation matrix of the tool coordinate system relative to the workpiece coordinate system.

[0019] Furthermore, in S1:

[0020] A five-axis universal forward kinematics model is established, and the homogeneous transformation matrix of the tool coordinate system relative to the workpiece coordinate system is:

[0021]

[0022] In the formula, P = [P x P y P z ] T For the tool tip coordinates relative to the workpiece coordinate system in the APT data, O = [O i O j O k ] T [g] is the unit vector of the tool axis relative to the workpiece coordinate system in the APT data. wt (θ w1 θ w2 θ x θ y θ z θ t2 θ t1 [)] is the total homogeneous transformation matrix from the tool coordinate system to the workpiece coordinate system, where (θ) w1 θ w2 θ x θ y θ z θ t2 θ t1 Let be the motion variables corresponding to the transfer matrices in the total homogeneous transformation matrix, representing the rotational axis w1 closest to the workpiece, the second closest to the workpiece w2, the translational axis x, the translational axis y, the translational axis z, the rotational axis t2 second closest to the tool, and the rotational axis t1 closest to the tool. pt r is the initial tool axis vector relative to the tool coordinate system. ot The initial tool tip coordinates relative to the tool coordinate system; [g bt (0)] refers to the initial homogeneous transformation matrix of the tool coordinate system relative to the base coordinate system, [g bw[0] refers to the initial homogeneous transformation matrix of the workpiece coordinate system relative to the base coordinate system; four rotation axes are preset here. and These are the homogeneous transformation matrices relative to the base coordinate system for the rotational axes w1 (closest to the workpiece), w2 (second closest to the workpiece), t1 (closest to the tool), and t2 (second closest to the tool). Since a five-axis machine tool has only two rotational axes, ... and Two of them are identity matrices I. 4×4 ; S represents the homogeneous transformation matrices of the translation axes X, Y, and Z relative to the base coordinate system, where S x Sy, S z The value is 1 or -1. If the corresponding translational axis is in the tool-machine tool kinematic chain, it is 1; if the corresponding translational axis is in the workpiece-machine tool kinematic chain, it is -1.

[0023] For joint i as the axis of rotation, its rotation and exponent are calculated as follows:

[0024]

[0025]

[0026] In the formula, ω i Let q be the unit direction vector of the rotation axis of joint i. i Let be the coordinates of any point on the axis of rotation;

[0027] For joint i as a translational axis, its rotation and exponent are calculated as follows:

[0028]

[0029] In the formula, v i Let θ be the unit direction vector of the translation axis. i The motion variable of the translation axis is X, Y, or Z.

[0030] Specifically, obtaining the inverse kinematics model includes: performing inverse kinematics based on the general forward kinematics model for five-axis CNC machine tools.

[0031] Inverse solution of the rotation axis:

[0032]

[0033] In the formula, This is the homogeneous transformation matrix corresponding to the rotation axis closest to the workpiece in the overall kinematic chain. This is the homogeneous transformation matrix corresponding to the rotation axis closest to the tool;

[0034] The final value of the axis of rotation is:

[0035] θ β =-S β arctan2(ω β T (G1×O1), G1 T O1), G1=G-ω β (ω p T G), O1=O-ω β (ω p T O) (6)

[0036] θ α =-S α arctan2(ω α T (r ot_1 ×G2), r ot_1 T G2), G2=G-ω α (ω α T G), r ot_1 =r ot -ω α (ω α T r ot (7)

[0037] In the formula, the relevant parameters and variables are:

[0038] G=k1ω β +k2ω α +k3(ω β ×ω α (8)

[0039]

[0040] The calculation for the translation axis is as follows:

[0041]

[0042] In the formula, the variable {θ w1 θ w2 θ t1 θ t2 The final solution set is {θ} α θ β The specific correspondence is determined according to the machine tool structure.

[0043] In some embodiments, in S2, based on the specific structure of the five-axis machine tool and the range of the rotary axes, a weight function is used to realize a general multi-solution programming based on the kinematics of the five-axis CNC machine tool.

[0044] Furthermore, in S2:

[0045] Five-axis general multi-solution programming is implemented based on the specific structure of the five-axis machine tool and the range of the rotary axes, using a weighting function; for the motion variables [X, Y, Z, θ] of the five-axis CNC machine tool. α θ β ], where α is the rotary axis closest to the tool and β is the rotary axis closest to the workpiece; considering that at least one rotary axis of a five-axis CNC machine tool has a large range, there are multiple solutions for the five-axis inverse kinematics;

[0046] Let [θ (i-1)α θ (i-1)β ] represents the final solution of the NC angle corresponding to the (i-1)th group of APT data, [θ iα_j θ iβ_j [ ] represents the j-th group among all feasible solutions for the NC angle corresponding to the i-th group of APT data. There are m feasible solutions in total, and the value range of the corresponding feasible solutions is {S i (θ α θ β If the solution is such that a weight function is set to calculate the final solution, then the final solution is calculated.

[0047]

[0048] In the formula, k1 and k2 represent the weights of the rotation angle changes of rotation axes α and β, respectively, and are taken as positive values ​​here.

[0049] In some embodiments, in S3, the sweep error area calculation involves transforming the CNC data to the machining coordinate system and calculating the area of ​​the ruled surface formed by sweeping during the transition of the cutting edge from the theoretical trajectory to the actual trajectory.

[0050] Furthermore, in S3:

[0051] The sweeping error area calculation involves transforming the CNC data to the machining coordinate system and calculating the area of ​​the ruled surface formed by sweeping during the transition of the cutting edge from the theoretical trajectory to the actual trajectory.

[0052] The sweep error area is calculated by letting the cutting edge length be T. len Let the poses of the i-th and (i+1)-th APT tools be T. apt_i and T apt_i+1 T nc_i and T nc_i+1 This corresponds to the tool pose in the machining coordinate system based on the CNC data; let t∈[0,1] at a certain moment of the transition interpolation, T apt_t and T nc_t These correspond to the interpolation poses at time t, which is the midpoint between the theoretical and actual tool poses; during this process, T apt_t The cutting edge is offset to Tnc_t The area of ​​the ruled surface swept during the process is defined as the sweep error area; the closer the actual tool tip trajectory is to the ideal tool tip trajectory, the smaller the sweep error area value will be.

[0053] Furthermore, in S4, the singularity analysis includes:

[0054] Based on the tool axis vectors in the APT data corresponding to the CNC data of the i-th group and (i+1) group respectively (V i V i+1 ), calculate the tool axis vector and the singular axis V0 = [0, 0, 1] respectively. T Does the angle exceed the set value ε? theta If it does not exceed the limit, it is considered to be within the singular cone SC, and the state is SC. in Otherwise, within the singular cone SC, the state is SC. out Finally, determine the feed type corresponding to the current data as {(SC)} in -SC in ), (SC in -SC out ), (SC out -SC out ), (SC out -SC in One of them, the corresponding processing method is {(A=(A)} i +A i+1 ) / 2, C-spline interpolation), (A-spline interpolation, C-spline interpolation), (increase the maximum sweep error area and traverse the data from the beginning), (A-spline interpolation, C-spline interpolation)}.

[0055] Furthermore, in S5, the cubic B-spline interpolation of the required rotation axis values ​​includes:

[0056] Calculate the slope of the boundary value of the rotation axis as the constraint condition of B-spline, set the initial number of interpolation points to k, and calculate whether the corresponding sweep error area is qualified. If qualified, proceed to the next step; otherwise, k = k + 2, increase the number of interpolation points and continue iterative calculation until the number of interpolation points that meet the conditions is determined and then discretely sampled from the B-spline.

[0057] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0058] This invention establishes a general kinematic model of a five-axis CNC machine tool using screws. By simply inputting the structural parameters of the machine tool, the forward and inverse kinematic models of the machine tool can be obtained quickly.

[0059] This invention establishes a general multi-solution programming model for five-axis CNC machine tools through weight functions. Different weights can be set according to the specific structure and range of the machine tool's rotary axis, which facilitates rapid multi-solution screening and avoids sudden changes in the angle of the rotary axis.

[0060] This invention solves the problem that complex curved surfaces are prone to sudden changes in rotation axis angles due to singular axes by compensating for singular errors in local data during post-processing.

[0061] This invention performs singular compensation based on the CNC data obtained from conventional post-processing, avoiding the error tracing problem that may arise from optimizing APT. Furthermore, the cubic B-spline compensation it employs is more consistent with the speed planning of the machine tool's rotary axis than conventional linear compensation, thus improving the completeness of the singular compensation algorithm. Attached Figure Description

[0062] The present invention will be further described below with reference to the accompanying drawings.

[0063] Figure 1 The flowchart illustrates the algorithm for singular compensation of a five-axis AC dual rotary table machine tool based on the sweep error area of ​​this invention.

[0064] Figure 2 This diagram illustrates the principle of motion modeling for a general-purpose five-axis CNC machine tool based on screw force.

[0065] Figure 3 This diagram illustrates the principle of kinematic modeling for a five-axis AC dual rotary table CNC machine tool according to the present invention.

[0066] Figure 4 Schematic diagram illustrating the sweep error area;

[0067] Figure 5 This diagram illustrates the principle of singularity type determination.

[0068] Figure 6 This indicates a trajectory diagram generated using conventional post-processing methods for the curved surface example.

[0069] Figure 7 This indicates the trajectory generated after conventional post-processing and singular compensation for the surface case; and

[0070] Figure 8 The image shows a simulation comparison in VERICUT of the trajectories generated by the surface case before (left) and after (right) singular compensation. Detailed Implementation

[0071] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0072] like Figure 1 As shown, the present invention provides a universal post-processing method for five-axis CNC machine tools based on singular compensation, comprising the following steps:

[0073] S1. Establish a general kinematic model of a five-axis CNC machine tool using five-axis screw dynamics, including forward and inverse kinematics. Input the structural type parameters of the five-axis CNC machine tool to obtain the inverse kinematics model:

[0074] A general kinematic model of a five-axis CNC machine tool is established using five-axis rotation. Based on the transformation from the tool coordinate system to the workpiece coordinate system, according to the structural rules of the five-axis machine tool, in the complete motion chain from the tool coordinate system to the workpiece coordinate system, the rotary axis coordinate system is generally located at both ends of the motion chain, and the types include: tRRTTTw, tRTTTRw, tTTTRRw.

[0075] Where t refers to the tool coordinate system, w refers to the workpiece coordinate system, R refers to the rotation axis coordinate system (i.e., one of A, B, and C), and T refers to the translation axis coordinate system (i.e., one of X, Y, and Z).

[0076] like Figure 2 As shown, a five-axis universal forward kinematics model is established, and the homogeneous transformation matrix of the tool coordinate system relative to the workpiece coordinate system is:

[0077]

[0078] In the formula, P = [P x P y P z ] T For the tool tip coordinates relative to the workpiece coordinate system in the APT data, O = [O i O j O k ] T [g] is the unit vector of the tool axis relative to the workpiece coordinate system in the APT data. wt (θ w1 θ w2 θ x θ y θ z θ t2 θ t1 [)] is the total homogeneous transformation matrix from the tool coordinate system to the workpiece coordinate system, where (θ)w1 θ w2 θ x θ y θ z θ t2 θ t1 Let be the motion variables corresponding to the transfer matrices in the total homogeneous transformation matrix, representing the rotational axis w1 closest to the workpiece, the second closest to the workpiece w2, the translational axis x, the translational axis y, the translational axis z, the rotational axis t2 second closest to the tool, and the rotational axis t1 closest to the tool. pt r is the initial tool axis vector relative to the tool coordinate system. ot The initial tool tip coordinates relative to the tool coordinate system; [g bt (0)] refers to the initial homogeneous transformation matrix of the tool coordinate system relative to the base coordinate system, [g bw [0] refers to the initial homogeneous transformation matrix of the workpiece coordinate system relative to the base coordinate system; four rotation axes are preset here. and These are the homogeneous transformation matrices relative to the base coordinate system for the rotational axes w1 (closest to the workpiece), w2 (second closest to the workpiece), t1 (closest to the tool), and t2 (second closest to the tool). Since a five-axis machine tool has only two rotational axes, ... and Two of them are identity matrices I. 4×4 The specific distribution depends on the structure of the machine tool. S represents the homogeneous transformation matrices of the translation axes X, Y, and Z relative to the base coordinate system, where S x S y S z The value is 1 or -1. If the corresponding translational axis is in the tool-machine tool kinematic chain, it is 1; if the corresponding translational axis is in the workpiece-machine tool kinematic chain, it is -1.

[0079] For joint i as the axis of rotation, its rotation and exponent are calculated as follows:

[0080]

[0081]

[0082] In the formula, ξ i Let i be the screw of the rotation axis i. Let be the unit direction vector of the rotation axis of joint i, and the operator '∧' will... Mapping to ξ i ∈se(3) and ω i ∈so(3), Let θ be the coordinates of any point on the axis of rotation; i The motion variable of the translation axis is X, Y, or Z.

[0083] For joint i as a translational axis, its rotation and exponent are calculated as follows:

[0084]

[0085] In the formula, v j It is the unit direction vector of the translation axis.

[0086] Inverse solution based on the general forward solution model for five-axis CNC machine tools:

[0087] Inverse solution of the rotation axis:

[0088]

[0089] In the formula Let be the homogeneous transformation matrix of the coordinate system of the rotation axis closest to the workpiece in the overall kinematic chain, relative to the base coordinate system. This is the homogeneous transformation matrix of the coordinate system of the rotation axis closest to the tool relative to the base coordinate system.

[0090] The final value of the axis of rotation is:

[0091] θ β =-S β arctan2(ω β T (G1×O1), G1 T O1), G1=G-ω β (ω p T G), O1=O-ω β (ω p T O) (6)

[0092] θ α =-S α arctan2(ω α T (r ot_1 ×G2), r ot_1 T G2), G2=G-ω α (ω α T G), r ot_1 =r ot -ω α (ω α T r ot (7)

[0093] In the formula, θ β θ is the CNC data angle value of the rotary axis closest to the workpiece. αThe CNC data angle value is taken for the rotary axis closest to the tool; S β The value is 1 if the rotation axis β acts on the tool, and -1 if the rotation axis β acts on the workpiece; S α The value ω is 1 if the rotation axis α acts on the tool, and -1 if the rotation axis α acts on the workpiece; β ω is the direction vector of the rotation vector along the rotation axis β in the base coordinate system. α Let G1, O1, G2, and r be the direction vectors of the rotation vector along the rotation axis α in the base coordinate system; ot_1 Both G and T are temporary variable symbols used to simplify formulas and have no practical meaning; T is the transpose symbol. Meanwhile, the correlation coefficient G has:

[0094] G=k1ω β +k2ω α +k3(ω β ×ω α (8)

[0095]

[0096] The calculation for the translation axis is as follows:

[0097]

[0098] In the formula, the variable {θ w1 θ w2 θ t1 θ t2 The final solution set is {θ} α θ β ,0,0},θ α θ is the CNC data angle value corresponding to the rotary axis closest to the tool. β The NC data angle value is taken for the rotary axis closest to the workpiece, and the specific correspondence is determined according to the machine tool structure.

[0099] S2. Implement a general multi-solution programming method for the kinematics of a five-axis CNC machine tool based on weight functions, and calculate and obtain preliminary CNC data by combining APT data:

[0100] Five-axis general multi-solution programming is implemented based on the specific structure of the five-axis machine tool and the range of the rotary axes, using a weighting function; for the motion variables [X, Y, Z, θ] of the five-axis CNC machine tool. α θ β ], where α is the rotary axis closest to the tool and β is the rotary axis closest to the workpiece. Considering that at least one rotary axis of a five-axis CNC machine tool has a large range, there are generally multiple solutions for the five-axis inverse kinematics.

[0101] Let [θ (i-1)α θ (i-1)β] represents the final solution of the NC angle corresponding to the (i-1)th group of APT data, [θ iα_j θ iβ_j [ ] represents the j-th group among all feasible solutions for the NC angle corresponding to the i-th group of APT data. There are m feasible solutions in total, and the value range of the corresponding feasible solutions is {S i (θ α θ β If the solution is such that a weight function is set to calculate the final solution, then the final solution is calculated.

[0102]

[0103] In the formula, k1 and k2 represent the weights of the rotation angles of the rotation axes α and β, respectively, and are taken as positive here;

[0104] S3, Set the maximum sweeping error area s lim Read the preliminary CNC data in a traversal manner and analyze the sweep error area s of the current group of data. i Check if the set range is met. If yes, read the next group; otherwise, perform an anomaly type check on the current group of data.

[0105] Calculate the sweep error area based on the read NC data, such as Figure 4 As shown, the minimum sweep area s is set. lim Let the cutting edge length be T. len Let the poses of the i-th and (i+1)-th APT tools be T. apt_i and T apt_i+1 Similarly, T nc_i and T nc_i+1 This corresponds to the tool pose in the machining coordinate system based on CNC data. Since post-processing is based on T... apt_i Solve for T nc_i Therefore, the two coordinate systems theoretically coincide in the machining coordinate system, and the deviation only exists in the transition interpolation of the nonlinear mapping between them. Let t∈[0,1] at a certain time of the transition interpolation, T apt_t and T nc_t These correspond to the interpolation pose at time t, which is the midpoint between the theoretical and actual tool poses. During this process, T... apt_t The cutting edge is offset to T nc_t The area of ​​the ruled surface swept during the process is defined as the sweep error area s. t Iterate through t, and find the current group's sweep error area value s. i The maximum value among them;

[0106] After obtaining the sweep error area of ​​the current data, compare it with the set value. If it is less than or equal to the set value s... lim If the condition is met, then directly read the next row of NC and APT data; otherwise, perform a singularity check on the current data.

[0107] S4. Based on the tool axis vector of the APT corresponding to the i-th and (i+1)-th NC data and the singular axis V0 = [0, 0, 1] T Is the included angle less than the set threshold ε? theta To determine the singular type to which the current data belongs:

[0108] Singularity analysis is based on the tool axis vector (V) in the APT data corresponding to the NC data of the i-th and (i+1)-th groups. i V i+1 Calculate the values ​​of V0 = [0, 0, 1] for each singular axis. T Does the angle exceed the set value ε? theta If the value is not exceeded, it is considered to be within the singular cone SC, and the state is SC. in Otherwise, it is SC. out To determine the specific singularity type of the current NC data, please refer to [reference needed]. Figure 5 That is, determine whether the NC data interpolation type corresponding to the current data belongs to {(SC in -SC in ), (SC in -SC out ), (SC out -SC out ), (SC out -SC in One of them, the corresponding processing method is {(A=(A)} i +A i+1 ) / 2, C-spline interpolation), (A-spline interpolation, C-spline interpolation), (increase the maximum sweep error area and traverse the data from the beginning), (A-spline interpolation, C-spline interpolation)}.

[0109] S5. Perform spline interpolation on a given rotation axis, i.e., perform cubic B-spline interpolation given the known boundary slopes. First, calculate the slopes K at the start and end points. i With K i+1 The initial number of interpolation points is set to k, and the corresponding sweep error area is calculated to determine if it meets the requirements. If it does, proceed to the next step; otherwise, k = k + 2, the number of interpolation points is increased, and iterative calculation continues. If the error requirements are met, the B-spline is discretized.

[0110] Specifically, for a given rotation axis M, cubic B-spline interpolation is performed to calculate the initial slope K. i =M i -M i-1 The final slope K i+1 =M i+2 -M i+1 Set the initial number of interpolation points k, and for the current data start and end points, according to K... i and K i+1The slope is used for cubic B-spline interpolation, interpolating k points each time. The sweep error area is compared, and if it does not meet the requirement, k = k + 2 is set until there are enough sampling points for all sweep error areas to meet the requirement. The final point obtained is {(i, M... i ), (i+1, M insert_1 ), ..., (i+k, M insert_k ), (i+1+k, M i+1 )} represents the final NC data, where M insert_i For in (M) i M i+1 The value of the rotation axis M in the first interpolation in ) is M. insert_k This is the kth data point in the interpolation.

[0111] The technical solution of the present invention will be described in detail below through specific embodiments.

[0112] like Figure 1 As shown, an embodiment of the present invention provides a general post-processing method for five-axis CNC machine tools based on singular compensation. Specifically, it involves setting spline surface data from CAM software to generate corresponding toolpaths. The spline surface is composed of four spatial straight lines or curves connected together, and its specific construction parameters are as follows:

[0113] Two straight lines (endpoints):

[0114] L1={p1(0,0,20),p2(0,100,30)}

[0115] L2={p3(100,0,30),p4(100,100,20)}

[0116] Two quintic B-spline curves (discrete point fitting):

[0117] SP1={p1, (19.397,0,24.804), (39.089,0,22.511), (62.649,0,20.555), (74.550,0,23.852),p3}

[0118] SP2={p4, (86.504, 100, 24.338), (64.729, 100, 21.228), (39.725, 100, 21.612), (25.041, 100, 26.620), p2}

[0119] The surface was constructed using a reciprocating machining strategy. The tool axis vector was defined to be perpendicular to the surface. The exported APT data is shown in Table 1.

[0120] Table 1

[0121]

[0122] like Figure 2 As shown, based on the structure of the five-axis AC dual rotary table machine tool, coordinate transformation can be performed to obtain the machine tool CNC data for translational axes X, Y, and Z, and rotary axes A and C. M Y M Z M AC and the tool tip coordinates [x] in APT data W y W z w The relationship between [ijk] and the tool axis vector [ijk] is expressed as follows:

[0123]

[0124] In the formula, These represent the homogeneous transformation matrices of rotation axis C, rotation axis A, and translation axes X, Y, and Z relative to the base coordinate system, respectively. bw [0] is the initial homogeneous transformation matrix of the workpiece coordinate system relative to the base coordinate system.

[0125] According to such Figure 3 The five-axis AC dual rotary table machine tool structure shown has its basic coordinate system set at the intersection of the AC axes. The rotary axis A-axis coordinate system and the workpiece coordinate system are also set at the intersection of the AC axes. That is, the basic coordinate system, the A-axis coordinate system, and the workpiece coordinate system coincide. Therefore, we can conclude that:

[0126]

[0127]

[0128]

[0129] In the formula, [ξ x ξ y ξ z ξ a ξ c ] are the screws of the translational axes X, Y, Z and the rotational axes A, C, respectively, [v x v y v z ω a ω c ] are the direction vectors of translational axes X, Y, Z and rotational axes A, C, respectively, relative to the base coordinate system, and [q x q y q z q a q c [g] The coordinates of a point on the translation axes X, Y, Z and the rotation axes A, C, respectively. bw[0] is the initial homogeneous transformation matrix of the workpiece coordinate system relative to the base coordinate system, [g bt [0] is the initial homogeneous transformation matrix of the tool coordinate system relative to the base coordinate system; L bwz L represents the offset distance of the workpiece coordinate system relative to the base coordinate system in the Z-axis direction. bwz =0; L btz L represents the offset distance of the tool coordinate system relative to the base coordinate system in the Z-axis direction. btz =0, the inverse kinematics solution of this AC five-axis dual rotary table machine tool can be obtained as follows:

[0130]

[0131] Based on the range of values ​​for the rotary axes of a five-axis AC CNC machine tool, let the ranges of AC be: A∈[-π / 2, π / 2] and C∈[-2π, 2π]. Let the initial value of A be A ini =arccos(k), where C is the initial value of C. ini =arctan(-i / j), let Λ = (A last C last As the final solution set for the rotation axes A and C, the specific values ​​of Λ in different cases are as follows:

[0132]

[0133] Based on the structure of the AC axis, we set the weight function for the multi-solution programming problem. For the i-th set of data, we have:

[0134] f(A, C, i) = min(|θ) iA -θ (i-1)A |+|θ iC -θ (i-1)C |) (18)

[0135] In the formula, (θ (i-1)A θ (i-1)C ) represents the final values ​​of rotation axes A and C in the (i-1)th set of data, (θ) iA θ iC Let ) represent all possible values ​​of rotation axes A and C in the current i-th data set, and let the weight of the change in both be 1.

[0136] The numerical control data obtained by solving the problem using the inverse solution formula and multiple solution programming is shown in Table 2.

[0137] Table 2

[0138]

[0139] Based on the preliminary CNC data, the tool tip trajectory is drawn, specifically as follows: Figure 6As shown in Table 2, the abrupt change in the C-axis value produces a significant singularity-induced nonlinear error on the tool tip trajectory.

[0140] Based on the preliminary NC data, singularity detection and compensation are performed. The area of ​​the swept ruled surface of the cutting edge in the machining coordinate system between the two sets of APT data and NC data is defined as the swept area error. The principle is as follows: Figure 4 As shown.

[0141] The cutting edge length T is used to define the singularity compensation calculation sweep error area. len The maximum allowable sweep error area is defined as s. lim Read the i-th and (i+1)-th APT data sets and combine them with the preliminary CNC data to form a set {(T apt_i T apt_i+1 ), (T nc_i T nc_i+1 )},(T apt_i T apt_i+1 ) represents the tool pose of the i-th and (i+1)-th APT data sets, including the tool tip coordinates and the tool axis vector, (T nc_i T nc_i+1 ) represents the tool pose of the i-th and (i+1)-th sets of CNC data, including the tool tip coordinates and the tool axis vector; let t∈[0,1] at a certain moment of the transition interpolation, T apt_t and T nc_t These correspond to the interpolation poses at time t, which is the midpoint between the theoretical and actual tool poses; during this process, T apt_t The cutting edge is offset to T nc_t The area of ​​the ruled surface swept during the process is defined as the sweep error area; calculate whether the sweep area error exceeds the limit value. If it does, perform a singularity check; otherwise, skip and read the next set of data.

[0142] The need for singularity type determination is determined based on the sweep error area assessment results. If singularity type determination is required, the maximum singularity determination angle ε is set. theta =0.05°. Calculate T respectively. apt_i With T apt_i+1 The tool axis vector V apt_i With V apt_i+1 With singular axis V0 = [0, 0, 1] T The included angle α i With α i+1 If α i ≤ε angle Then T apt_i Status is SC in Otherwise, it is SC. out According to T apt_i With T apt_i+1 State partitioning types, such as Figure 5 As shown, V i and V i+1 V refers to the tool axis vectors of the i-th and (i+1)-th data groups in the APT data, respectively. apt_i With V apt_i+1 The final singular type is in the following result {(SC in -SC in ), (SC in -SC out ), (SC out -SC out ), (SC out -SC in One of them.

[0143] The interpolation method is defined based on the singularity type determination result, according to the singularity type of the current APT data {(SC in -SC in ), (SC in -SC out ), (SC out -SC out ), (SC out -SC in The interpolation or processing methods corresponding to )} are respectively: {(A=(A i +A i+1 () / 2, C-spline interpolation), (A-spline interpolation, C-spline interpolation), (s) lim =1.2s lim (Iterate through the data from the beginning), (A-spline interpolation, C-spline interpolation)}.

[0144] Perform cubic B-spline interpolation on a rotation axis M and calculate the starting slope K. i =M i -M i-1 The final slope K i+1 =M i+1 -M i After iteration, the final number of interpolation points needed is k. Therefore, for the current data start and end points {(i, M... i ), (i+1+k, M i+1 According to K i and K i+1 The slope is then subjected to cubic B-spline interpolation. The final point obtained is {(i, M}. i ), (i+1, M insert_1 ), ..., (i+k, M insert_k ), (i+1+k, M i+1 )} represents the final CNC data, where M insert_i Let M be the value of the first rotation axis M in the interpolation. insert_k This is the kth data point in the interpolation.

[0145] like Figure 7 As shown, this is the NC trajectory after singular compensation.

[0146] like Figure 8 As shown, the CNC data before and after singular compensation were imported into VERICUT for simulation. The left side shows the simulation effect before optimization, where there is obvious overcutting on the surface of the part after machining. The right side shows the effect after optimization, where the toolpath cutting marks on the surface of the part are uniform and there are no obvious overcutting marks. This result can clearly verify the effectiveness of singular interpolation.

[0147] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A general post-processing method for five-axis NC machine tools based on singularity compensation, characterized in that, It comprises the following steps: S1, using five-axis spinor to establish a general kinematics model of five-axis NC machine tool, the kinematics model comprises a forward kinematics model and an inverse kinematics model; input machine structure type parameters, obtain the inverse kinematics model; S2, based on the general multi-solution planning of five-axis NC machine tool kinematics, combined with APT data, calculate the preliminary NC data; S3, traverse the sweep error area of the preliminary NC data, and determine whether the current data needs to be singular interpolation; S4, singular analysis is performed on the NC data that needs to be singular interpolated, and the singular type corresponding to the current data is determined; And S5, determine the interpolation object and interpolation method for the interpolation data of different singular types, and perform cubic B-spline interpolation on the required rotary axis value to obtain the final NC data.

2. The method of claim 1, wherein, In the S1, The establishment of the general kinematics model of the five-axis NC machine tool using the five-axis spinor comprises: using the homogeneous transformation matrix of the tool coordinate system relative to the workpiece coordinate system to establish the general forward kinematics model of the five-axis machine tool.

3. The method of claim 2, wherein, The homogeneous transformation matrix of the tool coordinate system relative to the workpiece coordinate system is: where P = [P x P y P z ] T is the tool tip coordinate of the tool in the workpiece coordinate system in the APT data, O = [O i O j O k ] T is the tool axis unit vector of the tool in the workpiece coordinate system in the APT data, [g wt (θ w1 , θ w2 , θ x , θ y , θ z , θ t2 , θ t1 )] is the total homogeneous transformation matrix of the tool coordinate system to the workpiece coordinate system, where (θ w1 , θ w2 , θ x , θ y , θ z , θ t2 , θ t1 ) are motion variables corresponding to the transmission matrix in the total homogeneous transformation matrix, respectively representing the rotation axis w1 closest to the workpiece, the rotation axis w2 second closest to the workpiece, the translation axis x, the translation axis y, the translation axis z, the rotation axis t2 second closest to the tool, the rotation axis t1 closest to the tool, and r pt is the initial tool axis vector of the tool relative to the tool coordinate system, r ot is the initial tool tip point coordinate of the tool relative to the tool coordinate system; [g bt (0)] is the initial homogeneous transformation matrix of the tool coordinate system relative to the base coordinate system, [g bw (0)] is the initial homogeneous transformation matrix of the workpiece coordinate system relative to the base coordinate system; here, four rotation axes are preset, and correspond to the rotation axis w1 closest to the workpiece, the rotation axis w2 second closest to the workpiece, and the rotation axis t1 closest to the tool and the rotation axis t2 second closest to the tool relative to the base coordinate system, respectively, where a five-axis machine tool has only two rotation axes, so that two of and are identity matrices I 4×4 ; represent the homogeneous transformation matrices of the translation axes X, Y, and Z relative to the base coordinate system, respectively, where the values of S x , S y , and S z are 1 or -1, 1 if the corresponding translation axis is in the tool-machine tool kinematic chain, and -1 if the corresponding translation axis is in the workpiece-machine tool kinematic chain. For joint i as a rotary axis, the spinor and index are calculated as follows: where ωi i is the unit direction vector of the rotation axis of joint i, qi i is the coordinate of an arbitrary point on the rotation axis. For joint i as a translational axis, the spinor and index are calculated as follows: where v i is the unit direction vector of the translation axis, θ i is the motion variable of the translation axis, X or Y or Z.

4. The method of claim 3, wherein, The acquisition of the inverse kinematics model comprises: Inverse solution is performed on the rotary axis: In the formula, is the homogeneous transformation matrix corresponding to the rotation axis closest to the workpiece in the overall kinematic chain, is the homogeneous transformation matrix corresponding to the rotation axis closest to the tool. The value of the last rotary axis is: θ β = -S β arctan2(ω β T (G1x O1), G1 T O1), G1 = G - ω β (ω p T G), O1 = O - ω β (ω p T O) (6) θ α = -S α arctan2(ω α T (r ot_1 × G2), r ot_1 T G2), G2= G - ω α (ω α T G), r ot_1 = r ot - ω α (ω α T r ot )(7) In the formula, the related parameters and variables are: G = k1ω β + k2ω α + k3(ω β x ω α ) (8) The calculation for the translational axis is: In the formula, the variables {θ w1 ,θ w2 ,θ t1 ,θ t2} are finally set as {θ α ,θ β ,0,0}, and the specific correspondence is determined according to the machine tool structure.

5. The method according to any one of claims 1-4, characterized in that, In the S2, Based on the specific structure of the five-axis machine tool and the range of the rotary axis, a weight function is used to realize the general multi-solution planning of the five-axis NC machine tool kinematics.

6. The method of claim 4, wherein, In the S3, The sweep error area calculation is to transform the NC data to the machining coordinate system, and calculate the area of the ruled surface formed by the sweep in the process of the transition of the cutting edge from the theoretical trajectory to the actual trajectory.

7. The method of claim 6, wherein, The sweep error area calculation comprises: Let the length of the cutting edge be T len , let the i-th and (i+1)-th APT tool poses be T apt_i and T apt_i+1 , T nc_i and T nc_i+1 correspond to the tool poses in the machining coordinate system of the numerical control data; let a certain moment t∈[0,1] of the transition interpolation be T apt_t and T nc_t correspond to the interpolation poses at the moment t in the theoretical and actual tool poses respectively; in this process, the cutting edge of T apt_t is offset to the straight surface swept in the process of T nc_t , and the area of the swept surface is defined as the swept error area.

8. The method of claim 7, wherein, In the S4, the singular analysis comprises: According to the tool axis vector (V i ,V i+1 ) in the APT data corresponding to the numerical control data of the i-th group and the (i+1)-th group, whether the angle between the tool axis vector and the singular axis V0=[0,0,1] T exceeds a set value ε theta is calculated respectively; if not, it is determined that it is in the singular cone SC, and the state is SC in ; otherwise, it is in the singular cone SC, and the state is SC out ; finally, it is judged that the feed type corresponding to the current data belongs to SC in -SC in , SC in -SC out , SC out -SC out , SC out -SC in One of them, the corresponding processing mode is A=(A i +A i+1 ) / 2 and C spline interpolation, A spline interpolation and C spline interpolation, increase the maximum swept error area and start from the beginning to traverse the data, A spline interpolation and C spline interpolation.

9. The method of claim 8, wherein, In the S5, the cubic B-spline interpolation of the required rotary axis value comprises: Calculate the boundary slope of the rotary axis value as the B-spline constraint condition, set the number of initial interpolation points as k, and calculate whether the corresponding sweep error area is qualified; if qualified, proceed to the next step, otherwise k=k+2, increase the number of interpolation points and continue iterative calculation until the number of interpolation points that meet the conditions is determined and is discretely sampled from the B-spline.

Citation Information

Patent Citations

  • Post-processing method for five-axis linked numerical control processing

    CN102269984B

  • Trajectory optimization method of singular region by virtue of five-axis machining

    CN102528554B

  • A five-axis CNC interpolation method based on tool vector smoothing compression

    CN102566494B

  • Control method for motion mutation phenomenon in compensation of five-axis face milling cutter

    CN103163830B

  • Post-processing Method for Domestic Double Swivel Head Five-axis Machine Tools

    CN103592888B