# US 2026/0267311 A1 · System, electronic device and computer-readable storage medium for collision detection of five-axis computer numerical control machine tool

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0267311 A1
- Document ID: US20260267311A1
- Status: Published application
- Kind: A1
- Application number: 19/555,874
- Filed: 2026-03-03
- Published: 2026-09-10
- Earliest claimed: 2023-09-04
- Assignees: 38th Research Institute, China Electronics Technology Group Corporation; Huazhong University of Science and Technology
- Applicants: 38Th Research Institute, China Electronics Technology Group Corporation; Huazhong University of Science and Technology
- Inventors: Mei WANG; Shuyan GAO; Tao HUANG; Yuxiao PAN; Wenqiang YAN; Xiaoming ZHANG; Han DING
- Web page: https://patentgrep.com/patent/US20260267311A1

## CPC

- G05B 19/402: characterised by control arrangements for positioning, e.g. centring a tool relative to a hole in the workpiece, additional detection means to correct position (G05B19/19 takes precedence)
- G05B 19/4069: Simulating machining process on screen (G05B19/4068 takes precedence)
- G05B 19/4061: Avoiding collision or forbidden zones
- G05B 2219/35316: Interference checking between tool, machine, part, chuck, machining range
- G05B 2219/49141: Detect near collision and slow, stop, inhibit movement tool
- Y02P 90/02: Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
- G05B: CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS (systems for controlling or regulating non-electric variables G05D; systems for regulating electric or magnetic variables G05F; control devices or systems insofar as characterised by mechanical features only G05G)
- Y02P: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS

## Abstract

A collision detection system for a five-axis CNC machine tool, an electronic device, and a storage medium are provided, which relate to the field of numerical control machine tools. The five-axis CNC machine tool collision detection system includes: a machine tool tree construction module, a coordinate system transformation module, a joint parameter calculation module, a motion simulation module, and a collision detection module. The system sets inner nodes and outer nodes according to a machine tool structure and obtains offsets; calculates homogeneous transformation matrices; reads a numerical control program and calculates joint parameters of the machine tool; performs motion simulation; and calculates absolute coordinates of surface points of links of two joints during the motion simulation to perform collision detection between two sets of meshes.

## Claims

### Claim 1

A system for collision detection of a five-axis computer numerical control (CNC) machine tool, comprising:
a machine tool tree construction module, configured to set inner nodes and outer nodes according to a structure of the five-axis CNC machine tool to construct a machine tool tree, and to obtain offsets of the inner nodes and the outer nodes, wherein the outer nodes correspond to three-dimensional models of components of the five-axis CNC machine tool, and the inner nodes correspond to joints of the five-axis CNC machine tool;
a coordinate system transformation module, configured to calculate, according to the machine tool tree and the offsets, homogeneous transformation matrices of joint coordinate systems, three-dimensional model coordinate systems, a tool tip point coordinate system, and a workpiece coordinate system relative to a world coordinate system {O} when the five-axis CNC machine tool is at an initial position;
a joint parameter calculation module, configured to read a numerical control program and calculate joint parameters of the five-axis CNC machine tool according to the homogeneous transformation matrices;
a motion simulation module, configured to, starting from a root node of the machine tool tree and in an order from a parent node to a child node, sequentially calculate exponential products of the joints and homogeneous transformation matrices of the three-dimensional model coordinate systems relative to the world coordinate system {O} using a recursive computation method, and to set positions of the three-dimensional models to perform motion simulation; and
a collision detection module, configured to calculate absolute coordinates of surface points on links corresponding to two joints among the joints during the motion simulation, and to perform collision detection between two sets of meshes.

### Claim 2 (depends on 1)

The system according to claim 1, wherein the coordinate system transformation module configured to calculate, according to the machine tool tree and the offsets, the homogeneous transformation matrices of the joint coordinate systems, the three-dimensional model coordinate systems, the tool tip point coordinate system, and the workpiece coordinate system relative to the world coordinate system {O} when the five-axis CNC machine tool is at the initial position is configured to:
calculate, according to the machine tool tree and the offsets, homogeneous transformation matrices of the joint coordinate systems relative to the world coordinate system {O} when the five-axis CNC machine tool is at the initial position according to the following expression:
{
O
T
1
⁢
(
0
)
=
I
4
×
4
O
T
i
⁢
(
0
)
=
O
T
i
-
1
⁢
(
0
)
⁢
i
-
1
T
i
⁢
(
i
=
2
,
…
,
n
)
,
wherein i denotes an i-th joint on a current kinematic chain, n denotes a total number of joints on the current kinematic chain, and a first joint is a machine bed joint, and i-1Ti denotes an offset of an i-th node; and
calculate, according to the machine tool tree and the offsets, homogeneous transformation matrices of the three-dimensional model coordinate systems, the tool tip point coordinate system {t}, and the workpiece coordinate system {w} relative to the world coordinate system {O} when the five-axis CNC machine tool is at the initial position according to the following expression:
O
T
l
⁢
(
0
)
=
O
T
j
⁢
(
0
)
j
⁢
T
l
,
wherein OTj denotes a homogeneous transformation matrix of a corresponding joint coordinate system relative to the world coordinate system {O}, and jTl denotes an offset of a node or a homogeneous transformation matrix of the tool tip point coordinate system {t} or the workpiece coordinate system {w} relative to the corresponding joint coordinate system.

### Claim 3 (depends on 1)

The system according to claim 1, wherein the joint parameter calculation module configured to read the numerical control program and calculate the joint parameters of the five-axis CNC machine tool according to the homogeneous transformation matrices is configured to:
(S301) calculate revolute joint parameters according to the following expression:
w
T
t
⁢
(
θ
1
,
θ
2
,
θ
3
,
θ
4
,
θ
5
)
,
3
=
O
T
w
-
1
⁢
(
0
)
⁢
e
m
1
⁢
θ
1
[
O
S
_
1
]
⁢
e
m
2
⁢
θ
2
[
O
S
_
2
]
⁢
e
m
3
⁢
θ
3
[
O
S
_
3
]
⁢
e
m
4
⁢
θ
4
[
O
S
_
4
]
⁢
e
m
5
⁢
θ
5
[
O
S
_
5
]
⁢
O
⁢
T
t
(
0
)
,
3
;
(
1
)
wherein θi(i=1,2,3,4,5) denotes a joint parameter of an i-th joint on two kinematic chains consisting of a kinematic chain from the workpiece coordinate system {w} to a machine bed coordinate system {b} and a kinematic chain from the machine bed coordinate system {b} to the tool tip point coordinate system {t};
wherein OSi(i=1,2,3,4,5) denotes a motion twist under unit velocity in the world coordinate system {O} at an initial state;
wherein in a case where a corresponding joint is on a tool kinematic chain, mi=1, and in a case where the corresponding joint is on a workpiece kinematic chain, mi=−1;
wherein in a case where the corresponding joint is a revolute joint,
O
S
i
¯
=
[
O
ω
¯
i
O
p
¯
i
×
O
ω
¯
i
]
,
and in a case where the corresponding joint is a prismatic joint,
O
S
i
¯
=
[
0
3
×
1
O
v
i
¯
]
,
and
⁢
e
[
O
S
_
i
]
⁢
m
i
⁢
θ
i
=
[
e
[
O
ω
_
i
]
⁢
m
i
⁢
θ
i
G
⁡
(
m
i
⁢
θ
i
)
O
⁢
v
_
i
0
1
]
,
wherein 03×1 denotes a column vector consisting of three zeros, Ovi and Oωi each denote a unit vector in a direction of joint motion, Opi denotes a vector from an origin of the world coordinate system {O} to an origin of an i-th joint coordinate system,
e
[
O
ω
_
i
]
⁢
m
i
⁢
θ
i
=
I
+
[
O
ω
_
i
]
⁢
sin
⁢
(
m
i
⁢
θ
i
)
+
[
O
ω
_
i
]
2
⁢
(
1
-
cos
⁢
(
m
i
⁢
θ
i
)
)
,
and G(miθi)=miθiI+(1−cos(miθi))[Oωi]+(miθi−sin(miθi))[Oωi]2;
wherein according to properties of homogeneous matrices and expression (1), the following expression is satisfied:
w
R
t
⁢
(
θ
1
,
θ
2
,
θ
3
,
θ
4
,
θ
5
)
,
3
=
O
R
w
-
1
⁢
(
0
)
⁢
e
m
R
1
⁢
θ
R
1
[
O
ω
¯
R
1
]
⁢
e
m
R
2
⁢
θ
R
2
[
O
ω
¯
R
2
]
⁢
O
R
t
⁢
(
0
)
,
3
,
wherein ORw−1(0) denotes an inverse of a rotation matrix of the workpiece coordinate system {w} relative to the world coordinate system {O} in a case where a joint parameter is zero, Ri(0),3 denotes a rotation matrix of a tool coordinate system relative to the world coordinate system {O} in a case where the joint parameter is zero, and Ri, i=1,2 denote an i-th revolute joint in the same order as described above;
wherein
e
-
m
R
1
-
θ
R
1
[
O
ω
¯
R
1
]
⁢
a
=
e
m
R
2
⁢
θ
R
2
[
O
ω
¯
R
2
]
⁢
b
=
c
is solved using Paden-Kahan subproblem 2, wherein a=ORw(0)wRt(θ1,θ2,θ3,θ4,θ3),3, b=ORt(0),3, c=αOωR1+βOωR2+γ(OωR1×OωR2), wherein
α
=
(
O
ω
R
?
T
⁢
O
ω
R
?
T
)
⁢
O
ω
_
R
?
T
⁢
b
-
O
ω
_
R
?
T
⁢
a
(
O
ω
_
R
?
T
⁢
O
ω
_
R
?
T
)
2
-
1
β
=
(
O
ω
_
R
?
T
⁢
O
ω
_
R
?
T
)
⁢
O
ω
_
R
?
T
⁢
a
-
O
ω
_
R
?
T
⁢
b
(
O
ω
_
R
?
T
⁢
O
ω
_
R
?
T
)
2
-
1
γ
=
±

a

2
-
α
2
-
β
2
-
2
⁢
αβ
⁢
O
ω
_
R
?
T
⁢
O
ω
_
R
?

O
ω
_
R
?
×
O
ω
_
R
?

2
?
indicates text missing or illegible when filed
and
the following solutions are obtained:
θ
R
1
=
-
a
⁢
tan
⁢
2
⁢
(
O
ω
_
R
1
T
⁢
(
u
×
v
)
,
u
T
⁢
v
)
m
R
1
,
wherein
⁢
u
=
a
-
O
ω
_
R
1
⁢
O
ω
_
R
1
T
⁢
a
,
v
=
c
-
O
ω
_
R
1
⁢
O
ω
_
R
1
T
⁢
c
;
θ
R
2
=
a
⁢
tan
⁢
2
⁢
(
O
ω
_
R
2
T
⁢
(
u
′
×
v
′
)
,
u
′
⁢
T
⁢
v
′
)
m
R
2
,
wherein
⁢
u
′
=
b
-
O
ω
_
R
2
⁢
O
ω
_
R
2
T
⁢
b
,
v
′
=
c
-
O
ω
_
R
2
⁢
O
ω
_
R
2
T
⁢
c
,
and wherein OωR1 denotes a unit vector in a motion direction of a first revolute joint, and OωR2 denotes a unit vector in a motion direction of a second revolute joint.

### Claim 4 (depends on 3)

The system according to claim 3, wherein the joint parameter calculation module configured to read the numerical control program and calculate the joint parameters of the five-axis CNC machine tool according to the homogeneous transformation matrices is further configured to:
(S302) calculate prismatic joint parameters according to the following expression:
O
T
M
⁢
(
0
)
M
⁢
T
t
(
θ
1
,
θ
2
,
θ
3
,
θ
4
,
θ
5
)
,
4
=
T
1
⁢
e
m
p
1
⁢
θ
p
1
[
O
S
¯
p
1
]
⁢
T
2
⁢
e
m
p
2
⁢
θ
p
2
[
O
S
¯
p
2
]
⁢
T
3
⁢
e
m
p
3
⁢
θ
p
3
[
O
S
¯
p
3
]
⁢
T
4
⁢
O
T
t
⁢
(
0
)
,
4
(
2
)
wherein pi, i=1,2,3 denotes an i-th prismatic joint in the same order as described above, T1 denotes a product of homogeneous transformation matrices of revolute joints before p1, T2 denotes a product of homogeneous transformation matrices of revolute joints between p1 and p2, T3 denotes a product of homogeneous transformation matrices of revolute joints between p2 and p3, and T4 denotes a product of homogeneous transformation matrices of revolute joints after p3;
wherein P′ denotes a displacement portion on a left-hand side of expression (2), and satisfies the following expression:
P
′
=
P
T
1
+
R
T
1
⁢
P
e
m
p
1
⁢
θ
p
1
[
O
S
_
p
1
]
+
R
T
1
⁢
P
T
2
+
R
T
1
⁢
R
T
2
⁢
P
e
m
p
2
⁢
θ
p
2
[
O
S
_
p
2
]
+
R
T
1
⁢
R
T
2
⁢
P
T
3
+
R
T
1
⁢
R
T
2
⁢
R
T
3
⁢
P
e
m
p
3
⁢
θ
p
3
[
O
S
_
p
3
]
+
R
T
1
⁢
R
T
2
⁢
R
T
3
⁢
P
T
4
+
R
T
1
⁢
R
T
2
⁢
R
T
3
⁢
R
T
4
⁢
P
O
T
t
(
0
)
,
4
,
which is simplified to obtain the following expression:
P
=
R
T
1
⁢
P
e
m
p
1
⁢
θ
p
1
[
O
S
_
p
1
]
+
R
T
1
⁢
R
T
2
⁢
P
e
m
p
2
⁢
θ
p
2
[
O
S
_
p
2
]
+
R
T
1
⁢
R
T
2
⁢
R
T
3
⁢
P
e
m
p
3
⁢
θ
p
3
[
O
S
_
p
3
]
;
(
3
)
wherein
⁢
P
=
P
′
-
P
T
1
-
R
T
1
⁢
P
T
2
-
R
T
1
⁢
R
T
2
⁢
P
T
3
-
R
T
1
⁢
R
T
2
⁢
R
T
3
⁢
P
T
4
-
R
T
1
⁢
R
T
2
⁢
R
T
3
⁢
R
T
4
⁢
P
o
T
t
(
0
)
,
4
,
and according to expression (3), the following expression is obtained:
P
=
R
x
⁢
P
e
m
x
⁢
θ
x
[
O
S
x
_
]
+
R
y
⁢
P
e
m
y
⁢
θ
y
[
O
S
y
_
]
+
R
z
⁢
P
e
m
z
⁢
θ
z
[
O
S
z
_
]
,
wherein x denotes an X-axis prismatic joint, y denotes a Y-axis prismatic joint, and z denotes a Z-axis prismatic joint, and Rx,Ry,Rz respectively denote corresponding SO(3) components in expression (3);
wherein let
P
=
R
[
θ
x
θ
y
θ
z
]
=
[
X
Y
Z
]
,
R
=
[
m
x
⁢
R
x
⁢
O
v
x
⁢
m
y
⁢
R
y
⁢
O
v
y
⁢
m
z
⁢
R
z
⁢
O
v
z
]
,
and u=R1,1R2,2R3,3−R3,2R2,3+R2,1R3,2R1,3−R1,2R3,3+R3,1R1,2R2,3−R2,2R1,3;
the following solutions are obtained:
{
θ
x
=
(
R
2
,
2
⁢
R
3
,
3
-
R
3
,
2
⁢
R
2
,
3
)
⁢
X
+
(
R
3
,
2
⁢
R
1
,
3
-
R
1
,
2
⁢
R
3
,
3
)
⁢
Y
+
(
R
1
,
2
⁢
R
2
,
3
-
R
2
,
2
⁢
R
1
,
3
)
⁢
Z
u
⁢
m
x
θ
y
=
(
R
3
,
1
⁢
R
2
,
3
-
R
2
,
1
⁢
R
3
,
3
)
⁢
X
+
(
R
1
,
1
⁢
R
3
,
3
-
R
3
,
1
⁢
R
1
,
3
)
⁢
Y
+
(
R
2
,
1
⁢
R
1
,
3
-
R
1
,
1
⁢
R
2
,
3
)
⁢
Z
u
⁢
m
y
θ
z
=
(
R
2
,
1
⁢
R
3
,
2
-
R
3
,
1
⁢
R
2
,
2
)
⁢
X
+
(
R
3
,
1
⁢
R
1
,
2
-
R
1
,
1
⁢
R
3
,
2
)
⁢
Y
+
(
R
1
,
1
⁢
R
2
,
2
-
R
2
,
1
⁢
R
1
,
2
)
⁢
Z
u
⁢
m
z
,
thereby obtaining the prismatic joint parameters;
(S303) when a tool tip following function is turned off, joint parameters corresponding to a numerical control program Xxnc Y ync Zznc Aanc Bbnc Ccnc are:
θ
x
′
=
m
x
⁢
x
n
⁢
c
+
θ
x
,
θ
y
′
=
m
y
⁢
y
n
⁢
c
+
θ
y
,
θ
z
′
=
m
z
⁢
z
n
⁢
c
+
θ
z
,
θ
a
′
=
m
a
⁢
a
n
⁢
c
,
θ
b
′
=
m
b
⁢
b
n
⁢
c
,
θ
c
′
=
m
c
⁢
c
n
⁢
c
;
wherein θx,θy,θz are joint parameters, wherein
w
T
t
⁢
(
θ
1
,
θ
2
,
θ
3
,
θ
4
,
θ
5
)
,
4
=
[
0
0
0
1
]
,
the revolute joint parameters are set to 0, and wherein mi(i=x,y,z,a,b,c)=−1 in a case where the corresponding joint is on the workpiece kinematic chain and mi(i=x,y,z,a,b,c)=1 in a case where the corresponding joint is on the tool kinematic chain; and
(S304) when the tool tip following function is turned on, joint parameters corresponding to the numerical control program Xxnc Y ync Zznc Aanc Bbnc Ccnc are
θ
a
′
=
m
a
⁢
a
n
⁢
c
,
θ
b
′
=
m
b
⁢
b
nc
,
θ
c
′
=
m
c
⁢
c
n
⁢
c
;
wherein
⁢
θ
x
′
,
θ
y
′
,
θ
z
′
are obtained by calculating
θ
a
′
,
θ
b
′
,
θ
c
′
and then through step (S302), wherein at step (S302),
w
T
t
⁢
(
θ
1
,
θ
2
,
θ
3
,
θ
4
,
θ
5
)
,
4
=
[
m
x
⁢
x
n
⁢
c
m
y
⁢
y
n
⁢
c
m
z
⁢
z
n
⁢
c
1
]
,
and wherein mi(i=x, y, z)=−1 in a case where a corresponding prismatic joint is on the workpiece kinematic chain and mi(i=x, y, z)=1 in a case where the corresponding prismatic joint is on the tool kinematic chain.

### Claim 5 (depends on 1)

The system according to claim 1, wherein the motion simulation module configured to, starting from the root node of the machine tool tree and in the order from the parent node to the child node, sequentially calculate exponential products of the joints and the homogeneous transformation matrices of the three-dimensional model coordinate systems relative to the world coordinate system {O} using the recursive computation method, and to set the positions of the three-dimensional models to perform the motion simulation is configured to:
calculate an exponential product of each of joints on a workpiece kinematic chain and a tool kinematic chain according to the following expression:
{
T
1
=
I
4
×
4
T
i
=
T
i
-
1
⁢
e
θ
i
[
O
S
i
_
]
⁢
O
(
i
=
2
,
…
,
n
)
,
wherein i denotes an i-th joint on a current kinematic chain, n denotes a total number of joints on the current kinematic chain, and a first joint is a machine bed joint, and θi denotes a joint parameter of an axis joint, wherein i=1,2,3,4,5, and for a non-axis joint, θi=0; and
calculate a homogeneous transformation matrix of each three-dimensional model coordinate system of the three-dimensional model coordinate systems relative to the world coordinate system {O} according to the following expression:
O
T
m
=
T
O
⁢
T
¯
m
,
wherein T denotes an exponential product of a joint corresponding to the three-dimensional model that corresponds to the three-dimensional model coordinate system, and OTm denotes a homogeneous transformation matrix of the three-dimensional model coordinate system relative to the world coordinate system {O} when the five-axis CNC machine tool is at the initial position.

### Claim 6 (depends on 1)

The system according to claim 1, wherein the collision detection module configured to calculate the absolute coordinates of the surface points on the links corresponding to the two joints among the joints during the motion simulation, and to perform the collision detection between the two sets of meshes is configured to:
determine that the three-dimensional models corresponding to all child nodes of a node of the machine tool tree that corresponds to a joint constitute links of the joint;
extract meshes of the three-dimensional models corresponding to all child nodes, and construct two bounding volume hierarchies of two links using a Morton Code method;
compare the two bounding volume hierarchies during collision detection, and when the two bounding volume hierarchies do not intersect, determine that two sets of triangle meshes do not intersect; and
when the two bounding volume hierarchies intersect, perform pairwise detection of intersections of child bounding volume hierarchies or sub-meshes until intersection testing of the triangle meshes is finally performed, and when the triangle meshes intersect, confirm that a collision occurs.

### Claim 7 (depends on 1)

A non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores a computer program that, when executed by a computer, causes the computer to perform functions of the machine tool tree construction module, the coordinate system transformation module, the joint parameter calculation module, the motion simulation module, and the collision detection module in the system according to claim 1.

### Claim 8 (depends on 1)

An electronic device, comprising:
one or more processors;
a memory; and
one or more programs stored in the memory and configured to be executed by the one or more processors;
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform functions of the machine tool tree construction module, the coordinate system transformation module, the joint parameter calculation module, the motion simulation module, and the collision detection module in the system according to claim 1.
