Universal motion simulation method and universal collision detection method for five-axis computer numerical control machine tools
By building a machine tool tree and calculating a homogeneous transformation matrix, general motion simulation and collision detection of five-axis CNC machine tools are realized, solving the problem of lack of universality in the existing technology and improving efficiency.
Patent Information
- Application Number
- PCT/CN2023/126419
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-04
- Filing Date
- 2023-10-25
- Publication Date
- 2025-03-13
AI Technical Summary
The existing five-axis CNC machine tools motion simulation and collision detection methods lack versatility, and different CNC program processing and simulation software development are required according to the five-axis machine tools of different structures, resulting in inefficiency.
By constructing the homogeneous transformation matrix of each joint and three-dimensional model at the initial position of the machine tool tree, and using the recursive method to calculate the exponential product of the joint and the coordinate system transformation matrix of the three-dimensional model, the motion simulation and collision detection of five-axis CNC machine tools are realized.
It realizes the five-axis machine tool that uses the same set of CNC programs to process any structure, improves the versatility and efficiency of motion simulation and collision detection, and avoids the development of different simulation software for five-axis machine tools with different structures.
Smart Images

Figure CN2023126419_13032025_PF_FP_ABST
Abstract
Description
General methods for motion simulation and collision detection of five-axis CNC machine tools Technical Field
[0001] The present invention relates to the technical field of numerically controlled machine tools, and in particular to a general method for motion simulation and collision detection of five-axis numerically controlled machine tools. Background Art
[0002] With the development of science and technology, five-axis CNC machine tools are widely used in the manufacturing process of high-end equipment such as the country's aviation, aerospace, military, scientific research, precision instruments, high-precision medical equipment, etc.
[0003] For five-axis CNC machine tool processing, NC program simulation is essential to prevent damage to the machine and cutting tools, such as tool collisions. Using digital twins to simulate machine tool processing in a virtual environment, we can verify whether machine tool components can achieve the required positions and collisions under the control of the NC program. This provides strong support for intelligent machining integration.
[0004] Existing methods for calculating the absolute position of each component of a machine tool through a CNC program usually require distinguishing the types of five-axis machine tools and using certain fixed relative distances between axes. This calculation method greatly limits the versatility of five-axis CNC machine tool motion simulation and collision detection.
[0005] Summary of the Invention
[0006] (1) Technical problems solved
[0007] In view of the shortcomings of the existing technology, the present invention provides a universal method for five-axis CNC machine tool motion simulation and a universal method for collision detection, which solves the technical problem of poor universality of the existing simulation methods.
[0008] (2) Technical solution
[0009] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0010] In a first aspect, the present invention provides a general method for motion simulation of a five-axis CNC machine tool, comprising:
[0011] S1. Set internal nodes and external nodes according to the machine tool structure, construct a machine tool tree, and obtain the offsets of each internal node and external node; wherein the external nodes correspond to the three-dimensional model of the corresponding machine tool components, and the internal nodes correspond to the joints;
[0012] S2. Calculate the homogeneous transformation matrices of the joint coordinate systems, three-dimensional model coordinate systems, tool location coordinate systems, and machining coordinate systems relative to the world coordinate system {O} at the initial position of the machine tool based on the machine tool tree and the offset;
[0013] S3, read the NC program and calculate the parameters of each joint of the machine tool according to the homogeneous transformation matrix;
[0014] S4. Using a recursive method, starting from the root node of the machine tool tree, in the order from parent node to child node, calculate the exponential product of each joint and the homogeneous transformation matrix of each three-dimensional model coordinate system relative to it, and set the position of each three-dimensional model for motion simulation.
[0015] Preferably, the S2 specifically includes:
[0016] According to the machine tool tree and offset, the homogeneous transformation matrix of each joint coordinate system relative to {O} at the initial position of the machine tool is calculated:
[0017] Where: i and n represent the i-th joint in the current kinematic chain and the total number of joints in the current kinematic chain, respectively. The first joint is always the bed joint. i-1 T i represents the node bias of the i-th node;
[0018] According to the machine tool tree and offset, the homogeneous transformation matrix of each three-dimensional model coordinate system, tool location coordinate system {t} and machining coordinate system {w} relative to {O} at the initial position of the machine tool is calculated: O T l (0)= O T j (0) j T l
[0019] in: O T j represents the homogeneous transformation matrix of the corresponding joint coordinate system relative to {O}, j T l Represents the node bias or the homogeneous transformation matrix of {t}, {w} relative to the corresponding joint coordinate system.
[0020] Preferably, the S3 specifically includes:
[0021] S301, calculating the rotational joint parameters, including:
[0022] Where: θ i (i=1, 2, 3, 4, 5) are the joint parameters of the i-th joint in the two kinematic chains from the machining coordinate system {w} to the bed coordinate system {b}, and then from the bed coordinate system {b} to the tool position coordinate system {t}; is the motion rotation at unit speed observed in {O} in the initial state; when the corresponding joint is on the tool motion chain, m i =1, when the corresponding joint is on the workpiece kinematic chain, m i=-1; when the corresponding joint is a revolute joint, When the corresponding joint is a linear joint,
[0023] Where, 0 3×1 Indicates that three 0s form a column;
[0024] Both represent unit vectors, and their directions are the directions of joint movement;
[0025] The vector indicating that the initial point is the origin of the world coordinate system and the end point is the origin of the i-joint coordinate system;
[0026] According to the properties of homogeneous matrix and formula (1), we have:
[0027] Where,
[0028] O R w -1 (0) represents the inverse of the rotation matrix of the machining coordinate system in the world coordinate system when the joint parameters are 0;
[0029] R t (0) ,3 Indicates the rotation matrix of the tool coordinate system in the world coordinate system when the joint parameter is 0;
[0030] R i , i=1,2 represents the i-th revolute joint in the same order as above;
[0031] Use Paden-Kahan subproblem2 solution
[0032] in,
[0033] a= O R w (0) w R t (θ1,θ2,θ3,θ4,θ5) ,3 , b= O R t (0) ,3 ,
[0034] in:
[0035] The solution is
[0036] in
[0037] in
[0038] Where,
[0039] Represents a unit vector, the direction of which is the movement direction of the first revolute joint;
[0040] Represents a unit vector, the direction of which is the movement direction of the second revolute joint;
[0041] S302, calculating linear joint parameters, specifically including:
[0042] Where,
[0043] p i , i = 1, 2, 3 represents the i-th linear joint in the same order as above; T1, T2, T3, T4 represent the product of the homogeneous transformation matrices of the rotational joints before p1, between p1 and p2, between p2 and p3, and after p3, respectively; using P' to represent the displacement part on the left side of equation (2), we have:
[0044] Simplifying to get:
[0045] in, From formula (3), we can get Among them, x, y, z represent the x linear motion joint, y linear motion joint, and z linear motion joint respectively, R x ,R y ,R z Respectively represent the corresponding SO(3) parts in formula (3),
[0046] Where R = [m x R x O v x m y R y O v y m z R z O v z ]
[0047] Let u = R 1,1 R 2,2 R 3,3 -R 3,2 R2,3 +R 2,1 R 3,2 R 1,3 -R 1,2 R 3,3 +R 3,1 R 1,2 R 2,3 -R 2,2 R 1,3
[0048] The solution is
[0049] Thus the linear joint parameters are obtained;
[0050] S303, when the tool tip point following function is turned off, the CNC program Xx nc Yy nc Zz nc Aa nc Bb nc Cc nc The corresponding joint parameters are: θ x '=m x x nc +θ x ,θ y '=m y y nc +θ y ,θ z '=m z z nc +θ z ,θ a '=m a a nc ,θ b '=m b b nc ,θ c '=m c c nc
[0051] Where θ x ,θ y ,θ z are joint parameters, where The parameters of the revolute joint are set to 0; the joint is m on the workpiece kinematic chain and the tool kinematic chain. i (i=x,y,z,a,b,c) are -1 and 1 respectively;
[0052] S304, when the tool tip point following function is turned on, the CNC program Xx nc Yy nc Zz nc Aa nc Bb nc Cc ncThe corresponding joint parameter is θ a '=m a a nc ,θ b '=m b b nc ,θ c '=m c c nc
[0053] Where θ x ',θ y ',θ z ' is to calculate θ a ',θ b ',θ c 'After the calculation in S302, Linear joints in the workpiece kinematic chain and tool kinematic chain i (i=x, y, z) are -1 and 1 respectively.
[0054] Preferably, the S4 specifically includes:
[0055] Calculate the exponential product of each joint in the workpiece kinematic chain and the tool kinematic chain
[0056] Where i represents the i-th joint in the current kinematic chain; n is the total number of joints in the current kinematic chain, and the first joint is always the bed joint; θ i represents the joint parameters of the axis joint, i = 1, 2, 3, 4, 5, and θ of the non-axis joint i is 0;
[0057] Calculate the homogeneous transformation matrix of each 3D model coordinate system relative to {O}:
[0058] In the formula, T represents the exponential product of the corresponding joints of the model, Represents the homogeneous transformation matrix of the model coordinate system relative to {O} in the initial state.
[0059] In a second aspect, the present invention provides a universal system for five-axis CNC machine tool motion simulation, comprising:
[0060] A machine tool tree construction module is used to set internal nodes and external nodes according to the machine tool structure, construct a machine tool tree, and obtain the offsets of each internal node and external node; wherein the external nodes correspond to the three-dimensional model of the corresponding machine tool components, and the internal nodes correspond to the joints;
[0061] A coordinate system conversion module is used to calculate the homogeneous transformation matrix of each joint coordinate system, each three-dimensional model coordinate system, tool position coordinate system and machining coordinate system expressed in the world coordinate system {O} at the initial position of the machine tool according to the machine tool tree and the offset relative to the world coordinate system {O};
[0062] The joint parameter calculation module is used to read the NC program and calculate the parameters of each joint of the machine tool according to the homogeneous transformation matrix;
[0063] The motion simulation module is used to use a recursive method, starting from the root node of the machine tool tree, and in the order of parent node to child node, to calculate the exponential product of each joint and the homogeneous transformation matrix of each three-dimensional model coordinate system relative to it, and set the position of each three-dimensional model for motion simulation.
[0064] In a third aspect, the present invention provides a general method for collision detection of a five-axis CNC machine tool, comprising:
[0065] S1. Set internal nodes and external nodes according to the machine tool structure, construct a machine tool tree, and obtain the offsets of each internal node and external node; wherein the external nodes correspond to the three-dimensional model of the corresponding machine tool components, and the internal nodes correspond to the joints;
[0066] S2. Calculate the homogeneous transformation matrices of the joint coordinate systems, three-dimensional model coordinate systems, tool location coordinate systems, and machining coordinate systems relative to the world coordinate system {O} at the initial position of the machine tool based on the machine tool tree and the offset;
[0067] S3, read the NC program and calculate the parameters of each joint of the machine tool according to the homogeneous transformation matrix;
[0068] S4. Using a recursive method, starting from the root node of the machine tool tree, in the order of parent node to child node, the exponential product of each joint and the homogeneous transformation matrix of each 3D model coordinate system relative to are calculated, and the position of each 3D model is set for motion simulation;
[0069] S5. Calculate the absolute coordinates of the surface points of the connecting rods of the two joints during the motion simulation process, and perform collision detection between the two groups of facets.
[0070] In a fourth aspect, the present invention provides a universal system for collision detection of a five-axis CNC machine tool, comprising:
[0071] A machine tool tree construction module is used to set internal nodes and external nodes according to the machine tool structure, construct a machine tool tree, and obtain the offsets of each internal node and external node; wherein the external nodes correspond to the three-dimensional model of the corresponding machine tool components, and the internal nodes correspond to the joints;
[0072] A coordinate system conversion module is used to calculate the homogeneous transformation matrix of each joint coordinate system, each three-dimensional model coordinate system, tool position coordinate system and machining coordinate system expressed in the world coordinate system {O} at the initial position of the machine tool according to the machine tool tree and the offset relative to the world coordinate system {O};
[0073] The joint parameter calculation module is used to read the NC program and calculate the parameters of each joint of the machine tool according to the homogeneous transformation matrix;
[0074] The motion simulation module is used to use a recursive method to calculate the exponential product of each joint and the homogeneous transformation matrix of each three-dimensional model coordinate system relative to the root node of the machine tool tree in the order of parent node to child node, and set the position of each three-dimensional model for motion simulation;
[0075] The collision detection module is used to calculate the absolute coordinates of the surface points of the connecting rods of the two joints during the motion simulation process and perform collision detection between the two groups of facets.
[0076] In a fifth aspect, the present invention provides a computer-readable storage medium storing a computer program for a general method for collision detection of five-axis CNC machine tools, wherein the computer program enables a computer to execute the general method for collision detection of five-axis CNC machine tools as described above.
[0077] In a sixth aspect, the present invention provides an electronic device, comprising:
[0078] one or more processors;
[0079] Memory; and
[0080] One or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include a method for executing the general method for collision detection of a five-axis CNC machine tool as described above. (3) Beneficial effects
[0081] The present invention provides a general method for motion simulation and collision detection of five-axis CNC machine tools. Compared with the existing technology, it has the following advantages:
[0082] The present invention can use the same set of CNC program processing methods to process five-axis machine tools of any structure, avoiding the use of different CNC program processing methods for five-axis machine tools of different structures and the development of simulation software that can only be used for a certain type of five-axis machine tool, effectively improving the versatility and efficiency of five-axis CNC machine tool motion simulation and collision detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0084] FIG1 is a flowchart of a five-axis CNC machine tool motion simulation according to an embodiment of the present invention;
[0085] FIG2 is an interface diagram of the machine tool motion simulation and collision detection module of the TurboCut software provided in an embodiment of the present invention;
[0086] FIG3 is a schematic structural diagram of a five-axis CNC machine tool provided in an embodiment of the present invention;
[0087] Figure 4 is a test diagram of a 45°B swing head-C turntable five-axis machine tool;
[0088] Figure 5 is a test diagram of the AC swing head five-axis machine tool;
[0089] Figure 6 is a test diagram of a BC rotary table five-axis machine tool;
[0090] Figure 7 is a test diagram of the B-swing head-C-turntable five-axis machine tool. DETAILED DESCRIPTION
[0091] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0092] The embodiments of the present application solve the technical problem of poor versatility of existing simulation methods by providing a general method for five-axis CNC machine tool motion simulation and a general method for collision detection, and realize the use of the same set of CNC program processing methods to process five-axis machine tools of arbitrary structures, thereby improving the versatility and efficiency of five-axis CNC machine tool motion simulation and collision detection.
[0093] The technical solution in the embodiments of the present application is to solve the above technical problems, and the overall idea is as follows:
[0094] CNC machine tool motion simulation and collision detection technologies are widely used in the processing of complex surface parts in aerospace and other fields. How to use a universal method to comprehensively calculate the absolute position and posture of each component of a five-axis arbitrary machine tool during motion and detect possible collisions is a research issue for many scholars and production personnel.
[0095] The tool position source file (CLSF) refers to the relative position of the tool position coordinate system with respect to the machining coordinate system during the machining process. The numerical control program (NC) is generated by the CLSF after post-processing, and represents the movement of each axis of the machine tool. The existing method of calculating the absolute position of each component of the machine tool through the numerical control program usually needs to distinguish the types of five-axis machine tools and fix the relative distances between certain specified axes. This calculation method greatly limits the versatility and efficiency of the motion simulation and collision detection of five-axis numerical control machine tools. In response to this problem, an embodiment of the present invention proposes a general method for motion simulation and collision detection of five-axis numerical control machine tools. This method can use the same set of numerical control program processing methods to process five-axis machine tools of any structure, avoiding the use of different numerical control program processing methods for five-axis machine tools of different structures and the development of simulation software that can only be used for a certain type of five-axis machine tool, effectively improving the versatility and efficiency of motion simulation and collision detection of five-axis numerical control machine tools.
[0096] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods.
[0097] An embodiment of the present invention provides a general method for motion simulation of a five-axis CNC machine tool, as shown in FIG1 , the method comprising:
[0098] S1. Set internal nodes and external nodes according to the machine tool structure, construct a machine tool tree, and obtain the offsets of each internal node and external node; wherein the external nodes correspond to the three-dimensional model of the corresponding machine tool components, and the internal nodes correspond to the joints;
[0099] S2. Calculate the homogeneous transformation matrices of the joint coordinate systems, three-dimensional model coordinate systems, tool location coordinate systems, and machining coordinate systems relative to the world coordinate system {O} at the initial position of the machine tool based on the machine tool tree and the offset;
[0100] S3, read the NC program and calculate the parameters of each joint of the machine tool according to the homogeneous transformation matrix;
[0101] S4. Using a recursive method, starting from the root node of the machine tool tree, in the order from parent node to child node, calculate the exponential product of each joint and the homogeneous transformation matrix of each three-dimensional model coordinate system relative to it, and set the position of each three-dimensional model for motion simulation.
[0102] The embodiment of the present invention can use the same set of CNC program processing methods to process five-axis machine tools of any structure, avoiding the use of different CNC program processing methods for five-axis machine tools of different structures and the development of simulation software that can only be used for a certain type of five-axis machine tool, effectively improving the versatility and efficiency of five-axis CNC machine tool motion simulation and collision detection.
[0103] The following is a detailed description of each step:
[0104] In step S1, internal nodes and external nodes are set according to the machine tool structure, a machine tool tree is constructed, and the offsets of each internal node and external node are obtained; wherein the external nodes correspond to the 3D model of the corresponding machine tool components, and the internal nodes correspond to the joints. The specific implementation process is as follows:
[0105] The machine tool tree consists of internal nodes and external nodes. External nodes correspond to models, and internal nodes correspond to joints. An internal node is the parent of an external node, indicating that the model corresponding to the external node is part of the link of the joint corresponding to the internal node. An internal node is the parent of another internal node, indicating that in the kinematic chain starting from the bed joint, the joint corresponding to the first internal node is in front of the joint corresponding to the second internal node.
[0106] Setting the offset of a node means setting the homogeneous transformation matrix of the joint or 3D model coordinate system corresponding to the current node relative to the joint coordinate system corresponding to the parent node;
[0107] Before setting the offset of the node, each coordinate system coincides with the world coordinate system {O}. After setting the offset, the position of the joint axis makes the movement correct.
[0108] In step S2, the homogeneous transformation matrices of the joint coordinate systems, 3D model coordinate systems, tool location coordinate systems, and machining coordinate systems expressed in the world coordinate system {O} at the initial position of the machine tool are calculated based on the machine tool tree and offset. The specific implementation process is as follows:
[0109] The homogeneous transformation matrix of each joint coordinate system relative to {O} at the initial position of the machine tool
[0110] Where: i and n represent the i-th joint in the current kinematic chain and the total number of joints in the current kinematic chain, respectively. The first joint is always the bed joint. i-1 T i represents the bias of the i-th node.
[0111] The homogeneous transformation matrix of the three-dimensional model coordinate system, tool position coordinate system {t} and machining coordinate system {w} relative to {O} at the initial position of the machine tool O T l (0)= O T j (0) j T l
[0112] in: O T j represents the homogeneous transformation matrix of the corresponding joint coordinate system relative to {O}, j T lRepresents the node bias or the homogeneous transformation matrix of {t}, {w} relative to the corresponding joint coordinate system.
[0113] In step S3, the numerical control program is read and the parameters of each joint of the machine tool are calculated according to the homogeneous transformation matrix. The specific implementation process is as follows:
[0114] S301, calculating the rotational joint parameters, specifically including:
[0115] Where: θ i (i=1, 2, 3, 4, 5) are the joint parameters of the i-th joint in the two kinematic chains from the machining coordinate system {w} to the bed coordinate system {b}, and then from the bed coordinate system {b} to the tool position coordinate system {t}; is the motion rotation at unit speed observed in {O} in the initial state; when the corresponding joint is on the tool motion chain, m i =1, when the corresponding joint is on the workpiece kinematic chain, m i =-1; when the corresponding joint is a revolute joint, When the corresponding joint is a linear joint, (General situation )
[0116] in;
[0117] 0 3×1 Indicates that three 0s form a column;
[0118] Both represent unit vectors, and their directions are the directions of joint movement;
[0119] The vector indicating that the initial point is the origin of the world coordinate system and the end point is the origin of the i-joint coordinate system;
[0120] According to the properties of homogeneous matrix and formula (1), we have:
[0121] in,
[0122] O R w -1 (0) represents the inverse of the rotation matrix of the machining coordinate system in the world coordinate system when the joint parameters are 0;
[0123] R t (0) ,3 Indicates the rotation matrix of the tool coordinate system in the world coordinate system when the joint parameter is 0;
[0124] Ri (i=1,2) represents the i-th rotation joint in the same order as above. Use Paden-Kahan subproblem2 to solve
[0125] in,
[0126] a= O R w (0) w R t (θ1,θ2,θ3,θ4,θ5) ,3 , b= O R t (0) ,3 ,
[0127] in:
[0128] The solution is
[0129] in
[0130] in
[0131] in,
[0132] Represents a unit vector, the direction of which is the movement direction of the first revolute joint;
[0133] Represents a unit vector whose direction is the movement direction of the second revolute joint.
[0134] Since γ has two solutions, There are two sets of solutions. Since the simulation process only needs to calculate the numerical control program X0Y0Z0A0B0C0 Generally at this time and The solutions are all 0, so any set of solutions can be selected.
[0135] S302, calculating linear joint parameters, specifically including:
[0136] Where: p i(i=1,2,3) represents the i-th linear joint in the same order as above, T1, T2, T3, T4 represent the product of the homogeneous transformation matrices of the rotational joints before p1, between p1 and p2, between p2 and p3, and after p3, respectively. Using P' to represent the displacement part on the left side of equation (2), we have:
[0137] Simplifying to get:
[0138] in, From formula (3), we can get Among them, x, y, z represent the x linear motion joint, y linear motion joint, and z linear motion joint respectively, R x ,R y ,R z Respectively represent the corresponding SO(3) (i.e., three-dimensional rotation group) part in formula (3), and we have
[0139] Where R = [m x R x O v x m y R y O v y m z R z O v z ]
[0140] Let u = R 1,1 R 2,2 R 3,3 -R 3,2 R 2,3 +R 2,1 R 3,2 R 1,3 -R 1,2 R 3,3 +R 3,1 R 1,2 R 2,3 -R 2,2 R 1,3
[0141] The solution is
[0142] Thus the linear joint parameters are obtained.
[0143] S303, when the tool tip point following function is turned off, the CNC program Xx nc Yy nc Zz nc Aa nc Bb nc Ccnc The corresponding joint parameters are: θ x '=m x x nc +θ x ,θ y '=m y y nc +θ y ,θ z '=m z z nc +θ z ,θ a '=m a a nc ,θ b '=m b b nc ,θ c '=m c c nc
[0144] Among them, θ x ,θ y ,θ z are joint parameters, where The parameters of the revolute joint are set to 0; the joint is m on the workpiece kinematic chain and the tool kinematic chain. i (i=x,y,z,a,b,c) are -1 and 1 respectively.
[0145] S304, when the tool tip point following function is turned on, the CNC program Xx nc Yy nc Zz nc Aa nc Bb nc Cc nc The corresponding joint parameter is θ a '=m a a nc ,θ b '=m b b nc ,θ c '=m c c nc
[0146] θ x ',θ y ',θ z ' is to calculate θ a ',θ b ',θ c 'After the calculation in S302, Linear joints in the workpiece kinematic chain and tool kinematic chain i (i=x, y, z) are -1 and 1 respectively.
[0147] In step S4, a recursive method is used, starting from the root node of the machine tool tree and proceeding from parent node to child node, to calculate the exponential product of each joint and the homogeneous transformation matrix of each 3D model coordinate system relative to the , and then set the position of each 3D model for motion simulation. The specific implementation process is as follows:
[0148] Calculate the exponential product of each joint in the workpiece kinematic chain and the tool kinematic chain
[0149] Where i represents the i-th joint in the current kinematic chain; n is the total number of joints in the current kinematic chain, the first joint is always the bed joint; θ i Represents the joint parameters of the axis joint, i = 1, 2, 3, 4, 5. The θ of the non-axis joint (such as the joint corresponding to the "spindle" node, the joint corresponding to the "fixture" node, etc.) i is 0.
[0150] Calculate the homogeneous transformation matrix of each 3D model coordinate system relative to {O}:
[0151] Among them, T represents the exponential product of the corresponding joints of the model, Represents the homogeneous transformation matrix of the model coordinate system relative to {O} in the initial state.
[0152] The present invention also provides a general method for collision detection of five-axis CNC machine tools. This method adds a collision detection step to the general method for motion simulation of five-axis CNC machine tools, including: S5, calculating the absolute coordinates of the surface points of the connecting rods of the two joints during the motion simulation process, performing collision detection between the two groups of facets, and accelerating the detection using the bounding box method. The specific implementation process is as follows:
[0153] The models corresponding to all child nodes of the node of the machine tool tree corresponding to the joint constitute the connecting rod of this joint. The faces of these models are extracted, and the hierarchical bounding boxes of the two connecting rods are quickly constructed using the Morton Code method. The two hierarchical bounding boxes are compared during collision detection. If the two bounding boxes do not intersect, then the two sets of triangular faces will definitely not intersect. If the two bounding boxes intersect, the intersection of the sub-bounding boxes or sub-faces is detected pairwise until the final triangle face intersection test is performed. If the triangle faces intersect, it means a collision has occurred.
[0154] During implementation, the aforementioned general collision detection method for five-axis CNC machine tools was coded and developed into software. The following uses TurboCut software to perform motion simulation and collision detection on a Mikron UCP 800 Duro five-axis CNC machine tool, as shown in Figures 2 and 3.
[0155] S1. Build the machine tool tree, set the tree nodes according to the machine tool structure, and correctly set the offset of each node. Set the offset of the "A-axis" node to (0 -49.985 120.024 0 0 0), the offset of the "C-axis" node to (0 49.985 -120.024 0 0 0), the offset of the "spindle" node to (0 0 601 0 0 0), the offset of the "workpiece" node to (0 0 100 0 0 0), and the offset of the "A_TABLE.STL" node to (0 49.985 -120.024 0 0 0).
[0156] S2. Calculate the homogeneous transformation matrices of the joint coordinate systems, model coordinate systems, tool location coordinate systems, and machining coordinate systems relative to {O} in the world coordinate system {O} at the initial position of the machine tool. The homogeneous transformation matrices of the joint coordinate systems relative to {O} at the initial position of the machine tool are: bed, X-axis, Y-axis, Z-axis, C-axis, fixture joint: I 4×4 , spindle and tool joints: Workpiece joint A-axis joint: The homogeneous transformation matrices of each model coordinate system relative to {O} are: BED.STL, A_TABLE_SURPORT.STL, X_AXIS.STL, Y_Axis.STL, Z_Axis.STL, A_TABLE.STL, C_TABLE.STL Model: I 4×4 , Spindle4.STL model: stock.stl model: The axis joint rotations represented by {O} are: X axis: Y-axis: Z-axis: A-axis: C-axis:
[0157] S3. Read the CNC program and calculate the parameters of each axis joint.
[0158] S4. Starting from the root node, in the order from parent node to child node, calculate the exponential product of each joint and the homogeneous transformation matrix of each model coordinate system relative to it, and set the virtual model position corresponding to each component in the machine tool for motion simulation.
[0159] S5. The models corresponding to all the child nodes of the node of the machine tool tree corresponding to the joint constitute the connecting rod of this joint. The facets of these models are extracted, and the hierarchical bounding boxes of the two connecting rods are quickly constructed using the MortonCode method. The two hierarchical bounding boxes are compared during collision detection. If the two bounding boxes do not intersect, then the two sets of triangular facets will definitely not intersect. If the two bounding boxes intersect, the intersection of the sub-bounding boxes or sub-facets is detected in pairs until the triangle face intersection test is finally performed. If the triangle facets intersect, it means a collision has occurred.
[0160] To ensure the adaptability of the embodiment of the present invention, four other five-axis machine tools were also tested, namely:
[0161] 1. Workpiece-C rotary table-Y-bed-XZ-45°B swing head-tool type five-axis machine tool (Figure 4).
[0162] 2. Workpiece-bed-YXZCA-tool type five-axis machine tool (Figure 5).
[0163] 3. Workpiece-C rotary table-B rotary table-X-bed-YZ-tool type five-axis machine tool (Figure 6). The bed is hidden for easy observation.
[0164] 4. Workpiece-C turntable-X-bed-ZYB swing head-tool type five-axis machine tool (Figure 7)
[0165] An embodiment of the present invention further provides a general system for five-axis CNC machine tool motion simulation, the system comprising:
[0166] A machine tool tree construction module is used to set internal nodes and external nodes according to the machine tool structure, construct a machine tool tree, and obtain the offsets of each internal node and external node; wherein the external nodes correspond to the three-dimensional model of the corresponding machine tool components, and the internal nodes correspond to the joints;
[0167] A coordinate system conversion module is used to calculate the homogeneous transformation matrix of each joint coordinate system, each three-dimensional model coordinate system, tool position coordinate system and machining coordinate system expressed in the world coordinate system {O} at the initial position of the machine tool according to the machine tool tree and the offset relative to the world coordinate system {O};
[0168] The joint parameter calculation module is used to read the NC program and calculate the parameters of each joint of the machine tool according to the homogeneous transformation matrix;
[0169] The motion simulation module is used to use a recursive method, starting from the root node of the machine tool tree, and in the order of parent node to child node, to calculate the exponential product of each joint and the homogeneous transformation matrix of each three-dimensional model coordinate system relative to it, and set the position of each three-dimensional model for motion simulation.
[0170] An embodiment of the present invention also provides a general system for collision detection of five-axis CNC machine tools. The system adds a collision detection module on the basis of the general method for motion simulation of five-axis CNC machine tools. The module is used to calculate the absolute coordinates of the surface points of the connecting rods of the two joints during the motion process, perform collision detection between two groups of facets, and use the bounding box method for acceleration.
[0171] It can be understood that the five-axis CNC machine tool motion simulation general system and collision detection general system provided in the embodiments of the present invention correspond to the above-mentioned five-axis CNC machine tool motion simulation general method and collision detection general method. The explanations, examples, beneficial effects, etc. of the relevant contents can refer to the corresponding contents in the five-axis CNC machine tool motion simulation general method and collision detection general method, and will not be repeated here.
[0172] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program for a general method for collision detection of a five-axis CNC machine tool, wherein the computer program enables a computer to execute the general method for collision detection of a five-axis CNC machine tool as described above.
[0173] An embodiment of the present invention further provides an electronic device, including:
[0174] one or more processors;
[0175] Memory; and
[0176] One or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include a method for executing the general method for collision detection of a five-axis CNC machine tool as described above.
[0177] In summary, compared with the existing technology, the present invention has the following beneficial effects:
[0178] 1. The embodiment of the present invention can use the same set of NC program processing methods to process five-axis machine tools of any structure, avoiding the use of different NC program processing methods for five-axis machine tools of different structures and the development of simulation software that can only be used for a certain type of five-axis machine tool, effectively improving the versatility and efficiency of five-axis NC machine tool motion simulation and collision detection.
[0179] 2. In an embodiment of the present invention, users can set node offsets, thereby enabling the use of different rotary axis, translational axis, tool, and workpiece offsets on a five-axis machine tool with the same layout, further demonstrating the adaptability of the invention.
[0180] 3. The embodiment of the present invention supports an advanced function: tool tip point following, which can cover the advantageous function of a five-axis machine tool over a three-axis machine tool.
[0181] 4. Based on the above advantages, the embodiment of the present invention can extract the facets and positions of each model for collision detection with high detection accuracy.
[0182] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0183] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A general method for motion simulation of a five-axis CNC machine tool, characterized in that: Includes: S1. Set internal nodes and external nodes according to the machine tool structure, construct a machine tool tree, and obtain the offset of each internal node and external node; wherein the external node corresponds to the three-dimensional model of the machine tool component, and the internal node corresponds to the joint; S2. Calculate the homogeneous transformation matrix of each joint coordinate system, each three-dimensional model coordinate system, tool position coordinate system and machining coordinate system expressed in the world coordinate system {O} at the initial position of the machine tool according to the machine tool tree and the offset relative to the world coordinate system {O}; S3, reading the numerical control program, and calculating the parameters of each joint of the machine tool according to the homogeneous transformation matrix; S4. Using a recursive method, starting from the root node of the machine tool tree, in the order from the parent node to the child node, the exponential product of each joint and the homogeneous transformation matrix of each three-dimensional model coordinate system relative to are calculated in turn, and the position of each three-dimensional model is set for motion simulation.
2. The general method for motion simulation of a five-axis CNC machine tool as claimed in claim 1, characterized in that: The S2 specifically includes: According to the machine tool tree and offset, the homogeneous transformation matrix of each joint coordinate system relative to {O} at the initial position of the machine tool is calculated: Where: i and n represent the i-th joint in the current kinematic chain and the total number of joints in the current kinematic chain, respectively. The first joint is always the bed joint. i-1 T i represents the node bias of the i-th node; According to the machine tool tree and offset, the homogeneous transformation matrix of the three-dimensional model coordinate system, tool location coordinate system {t} and machining coordinate system {w} relative to {O} at the initial position of the machine tool is calculated: O T l (0)= O T j (0) j T l in: O T j represents the homogeneous transformation matrix of the corresponding joint coordinate system relative to {O}, j T l Represents the node bias or the homogeneous transformation matrix of {t}, {w} relative to the corresponding joint coordinate system.
3. The general method for motion simulation of a five-axis CNC machine tool as claimed in claim 1, characterized in that: The S3 specifically includes: S301, calculating the rotational joint parameters, including: Where: θ i (i=1,2,3,4,5) are the joint parameters of the i-th joint in the two kinematic chains from the machining coordinate system {w} to the bed coordinate system {b}, and then from the bed coordinate system {b} to the tool position coordinate system {t}; is the motion rotation at unit speed observed in {O} in the initial state; when the corresponding joint is on the tool kinematic chain, m i =1, when the corresponding joint is on the workpiece kinematic chain, m i =-1; when the corresponding joint is a revolute joint, When the corresponding joint is a linear joint, Where, 0 3×1 Indicates that three 0s form a column; All represent unit vectors, and their directions are the directions of joint movement; The vector indicating that the initial point is the origin of the world coordinate system and the end point is the origin of the i-joint coordinate system; According to the properties of homogeneous matrices and formula (1), we have: In the formula, O R w -1 (0) represents the inverse of the rotation matrix of the machining coordinate system in the world coordinate system when the joint parameter is 0; R t (0) ,3 Indicates the rotation matrix of the tool coordinate system in the world coordinate system when the joint parameter is 0; R i , i=1,2 represents the i-th rotation joint in the same order as above; Solve using Paden-Kahan subproblem 2 in, a= O R w (0) w R t (θ1,θ2,θ3,θ4,θ5) ,3 ,b= O R t (0) ,3 , in: Solved in in In the formula, Represents a unit vector, the direction of which is the movement direction of the first revolute joint; Represents a unit vector, and its direction is the movement direction of the second revolute joint; S302, calculating linear joint parameters, specifically including: In the formula, p i , i = 1, 2, 3 represents the i-th linear joint in the same order as above; T1, T2, T3, T4 represent the product of the homogeneous transformation matrices of the rotational joints before p1, between p1 and p2, between p2 and p3, and after p3, respectively; using P' to represent the displacement part on the left side of equation (2), we have: Simplifying gives: in, From formula (3), we can get Among them, x, y, z represent the x linear motion joint, y linear motion joint, and z linear motion joint respectively, R x ,R y ,R z Respectively represent the corresponding SO(3) part in formula (3), where R = [m x R x O v x m y R y O v y m z R z O v z Let u = R 1,1 R 2,2 R 3,3 -R 3,2 R 2,3 +R 2,1 R 3,2 R 1,3 -R 1,2 R 3,3 +R 3,1 R 1,2 R 2,3 -R 2,2 R 1,3 Solved Thus, the linear joint parameters are obtained; S303, when the tool tip point following function is turned off, the CNC program Xx nc Yy nc Zz nc Aa nc Bb nc Cc nc The corresponding joint parameters are: i x '=m x x nc +θ x ,i y '=m y y nc +θ y ,i z '=m z z nc +θ z ,i a '=m a a nc ,i b '=m b b nc ,i c '=m c c nc In the formula, θ x ,θ y ,θ z are the joint parameters, where The parameters of the revolute joint are set to 0; the joints are m in the workpiece kinematic chain and the tool kinematic chain. i (i=x,y,z,a,b,c) are -1 and 1 respectively; S304, when the tool tip point following function is turned on, the CNC program Xx nc Yy nc Zz nc Aa nc Bb nc Cc nc The corresponding joint parameters are i a '=m a a nc ,i b '=m b b nc ,i c '=m c c nc In the formula, θ x ',θ y ',θ z ' is to calculate θ a ',θ b ',θ c 'After being calculated by S302, S302 Linear joints in the workpiece kinematic chain and tool kinematic chain i (i=x, y, z) are -1 and 1 respectively.
4. A general method for motion simulation of a five-axis CNC machine tool according to any one of claims 1 to 3, characterized in that: The S4 specifically includes: Calculate the exponential product of each joint in the workpiece kinematic chain and the tool kinematic chain Where i represents the i-th joint in the current kinematic chain; n represents the total number of joints in the current kinematic chain. The joint is always the bed joint; θ i represents the joint parameters of the axis joint, i = 1, 2, 3, 4, 5, and θ of the non-axis joint i is 0; Calculate the homogeneous transformation matrix of each 3D model coordinate system relative to {O}: In the formula, T represents the exponential product of the corresponding joints of the model, Represents the homogeneous transformation matrix of the model coordinate system relative to {O} in the initial state.
5. A universal system for motion simulation of five-axis CNC machine tools, characterized in that: include: A machine tool tree construction module is used to set internal nodes and external nodes according to the machine tool structure, construct a machine tool tree, and obtain the offset of each internal node and external node; wherein the external node corresponds to the three-dimensional model of the machine tool component, and the internal node corresponds to the joint; A coordinate system conversion module is used to calculate the homogeneous transformation matrix of each joint coordinate system, each three-dimensional model coordinate system, tool position coordinate system and machining coordinate system expressed in the world coordinate system {O} at the initial position of the machine tool according to the machine tool tree and the offset relative to the world coordinate system {O}; The joint parameter calculation module is used to read the numerical control program and calculate the parameters of each joint of the machine tool according to the homogeneous transformation matrix; The motion simulation module is used to use a recursive method, starting from the root node of the machine tool tree, in the order of parent node to child node, to calculate the exponential product of each joint and the homogeneous transformation matrix of each three-dimensional model coordinate system relative to , and set the position of each three-dimensional model for motion simulation.
6. A general method for collision detection of a five-axis CNC machine tool, characterized in that: include: S1. Set internal nodes and external nodes according to the machine tool structure, construct a machine tool tree, and obtain the offset of each internal node and external node; wherein the external node corresponds to the three-dimensional model of the machine tool component, and the internal node corresponds to the joint; S2. Calculate the homogeneous transformation matrix of each joint coordinate system, each three-dimensional model coordinate system, tool position coordinate system and machining coordinate system expressed in the world coordinate system {O} at the initial position of the machine tool according to the machine tool tree and the offset relative to the world coordinate system {O}; S3, reading the numerical control program, and calculating the parameters of each joint of the machine tool according to the homogeneous transformation matrix; S4, using a recursive method, starting from the root node of the machine tool tree, in the order of the parent node to the child node, the exponential product of each joint and the homogeneous transformation matrix of each three-dimensional model coordinate system relative to are calculated in turn, and the position of each three-dimensional model is set for motion simulation; S5. Calculate the absolute coordinates of the surface points of the connecting rods of the two joints during the motion simulation process, and perform collision detection between the two groups of facets.
7. A universal system for collision detection of five-axis CNC machine tools, characterized in that: include: A machine tool tree construction module is used to set internal nodes and external nodes according to the machine tool structure, construct a machine tool tree, and obtain the offset of each internal node and external node; wherein the external node corresponds to the three-dimensional model of the machine tool component, and the internal node corresponds to the joint; A coordinate system conversion module is used to calculate the homogeneous transformation matrix of each joint coordinate system, each three-dimensional model coordinate system, tool position coordinate system and machining coordinate system expressed in the world coordinate system {O} at the initial position of the machine tool according to the machine tool tree and the offset relative to the world coordinate system {O}; The joint parameter calculation module is used to read the numerical control program and calculate the parameters of each joint of the machine tool according to the homogeneous transformation matrix; The motion simulation module is used to use a recursive method, starting from the root node of the machine tool tree, and in the order of the parent node to the child node, successively calculate the exponential product of each joint and the homogeneous transformation matrix of each three-dimensional model coordinate system relative to , and set the position of each three-dimensional model for motion simulation; The collision detection module is used to calculate the absolute coordinates of the surface points of the connecting rods of the two joints during the motion simulation process and to perform collision detection between the two groups of facets.
8. A computer-readable storage medium, characterized in that: It stores a computer program for a general method for collision detection of a five-axis CNC machine tool, wherein the computer program enables a computer to execute the general method for collision detection of a five-axis CNC machine tool as claimed in claim 6.
9. An electronic device, characterized in that: include: one or more processors; Memory; as well as One or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, the programs including a method for executing the general method for collision detection of a five-axis CNC machine tool as claimed in claim 6.
Citation Information
Patent Citations
Conflict determination device and conflict determination procedure
CN102282561A
Real-time anti-collision method for numerically-controlled machine tool
CN106202767A
Control system
CN112987650A
Cited By
Feature identification method and system for triangular mesh model of machine tool component
CN120451955A
Human-computer interaction method, device and equipment based on aircraft unstructured grid and storage medium
CN120973241A