Disclosure of Invention
The invention aims to solve the technical problem of providing a universal numerical control machine tool kinematics modeling method, wherein the established numerical control machine tool kinematics model has good portability and universality, and the precision of objects with complex processing outlines can be effectively improved.
The technical scheme adopted by the invention for solving the technical problems is as follows: a general kinematic modeling method for a numerical control machine is characterized by comprising the following steps:
firstly, a reference three-dimensional coordinate system of a numerical control machine tool is established, and then the spatial position of each axis in the numerical control machine tool is determined in the reference three-dimensional coordinate system of the numerical control machine tool;
determining a three-dimensional coordinate system of a machine tool base and a three-dimensional coordinate system of a cutter in the numerical control machine tool, and correspondingly recording an X axis, a Y axis and a Z axis in the three-dimensional coordinate system of the machine tool base as X0、Y0And Z0Let X, Y and Z axes in the three-dimensional coordinate system of the tool correspond to each other as XN+1、YN+1And ZN+1Wherein, the three-dimensional coordinate system of the machine tool base is the reference three-dimensional coordinate system established in the step I; then establishing a three-dimensional coordinate system of each axis in the numerical control machine tool according to the spatial position of each axis in the numerical control machine tool, and correspondingly recording an X axis, a Y axis and a Z axis in the three-dimensional coordinate system of the ith axis as X axisi、YiAnd ZiWherein i is more than or equal to 1 and less than or equal to N, and N represents the total number of shafts in the numerical control machine tool;
thirdly, calculating the Z axis Z in the three-dimensional coordinate system of the 1 st axis1And Z0The shortest distance and angle between them, the correspondence being denoted as dz1And alpha1(ii) a Calculating the shortest distance and included angle between Z axes in the three-dimensional coordinate system of two adjacent axes, and calculating the Z axis Z in the three-dimensional coordinate system of the jth axisjZ axis Z in three-dimensional coordinate system with j-1 th axisj-1The shortest distance and the corresponding included angle between them are recorded as dzjAnd alphajWherein j is more than or equal to 2 and less than or equal to N; calculating ZN+1Z axis Z in three-dimensional coordinate system with Nth axisNThe shortest distance and angle between them, the correspondence being denoted as dzN+1And alphaN+1;
Calculating the X-axis X in the 1 st axis three-dimensional coordinate system1And X0The shortest distance and included angle between, the correspondence is denoted dx1And theta1(ii) a Calculating the shortest distance and included angle between X axes in the three-dimensional coordinate systems of two adjacent axes, and calculating the X axis X in the three-dimensional coordinate system of the jth axisjAnd the X axis X in the three-dimensional coordinate system of the j-1 th axisj-1The shortest distance and the angle correspondence between them are denoted dxjAnd thetajWherein j is more than or equal to 2 and less than or equal to N; calculating XN+1X-axis X in three-dimensional coordinate system with Nth axisNThe shortest distance and included angle between, the correspondence is denoted dxN+1And thetaN+1;
Iv according to dz
1、α
1、dx
1And theta
1Constructing a transformation matrix between the three-dimensional coordinate system of the 1 st axis and the three-dimensional coordinate system of the machine base, and recording the transformation matrix as
,
<math>
<mrow>
<mmultiscripts>
<mi>T</mi>
<mn>1</mn>
<mn>0</mn>
</mmultiscripts>
<mo>=</mo>
<mfenced open='[' close=']'>
<mtable>
<mtr>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mo>-</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dz</mi>
<mn>1</mn>
</msub>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mo>-</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dz</mi>
<mn>1</mn>
</msub>
<mo>×</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dx</mi>
<mn>1</mn>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
</mtable>
</mfenced>
<mo>,</mo>
</mrow>
</math> Wherein cos () is a cosine function, sin () is a sine function;
constructing a transformation matrix between three-dimensional coordinate systems of two adjacent axes, and recording the transformation matrix between the three-dimensional coordinate system of the jth axis and the three-dimensional coordinate system of the jth-1 axis as the transformation matrix, <math>
<mrow>
<mmultiscripts>
<mi>T</mi>
<mi>j</mi>
<mrow>
<mi>j</mi>
<mo>-</mo>
<mn>1</mn>
</mrow>
</mmultiscripts>
<mfenced open='[' close=']'>
<mtable>
<mtr>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mo>-</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dz</mi>
<mi>j</mi>
</msub>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mo>-</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dz</mi>
<mi>j</mi>
</msub>
<mo>×</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dx</mi>
<mi>j</mi>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
</mtable>
</mfenced>
<mo>,</mo>
</mrow>
</math> Wherein j is more than or equal to 2 and less than or equal to N;
according to dz
N+1、α
N+1、dx
N+1And theta
N+1Constructing a transformation matrix between the three-dimensional coordinate system of the tool and the three-dimensional coordinate system of the Nth axis, and recording the transformation matrix as
,
<math>
<mrow>
<mmultiscripts>
<mi>T</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
<mi>N</mi>
</mmultiscripts>
<mo>=</mo>
<mfenced open='[' close=']'>
<mtable>
<mtr>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mo>-</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dz</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mo>-</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dz</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo></mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dx</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
</mtable>
</mfenced>
<mo>;</mo>
</mrow>
</math>
Establishing kinematic model of numerically controlled machine tool and recording as
Wherein,
a transformation matrix between the three-dimensional coordinate system of the 2 nd axis and the three-dimensional coordinate system of the 1 st axis,
and representing a transformation matrix between the three-dimensional coordinate system of the Nth axis and the three-dimensional coordinate system of the (N-1) th axis, wherein j is more than or equal to 2 and less than or equal to N.
The shafts in the numerical control machine tool comprise all shafts which do rotary motion and all shafts which do translational motion.
In the second step, the process of establishing the three-dimensional coordinate system of the ith axis is as follows:
② -1, the axis of the ith shaft is taken as the ith shaftZ-axis in the three-dimensional coordinate system of axes, denoted as Zi;
2, selecting any point on the axis of the ith shaft as the origin of the three-dimensional coordinate system of the ith shaft, and recording the point as Oi;
Secondly-3, judging whether the ith shaft is the 1 st shaft or not, if so, enabling the ith shaft to be parallel to the axis of the ith shaft and Z0Perpendicular to the origin OiThe X axis in the three-dimensional coordinate system with the intersected line as the ith axis is recorded as XiThen executing step two-4; otherwise, it will be parallel to the common perpendicular to the axis of the ith shaft and the axis of the (i-1) th shaft, and to the origin OiThe X axis in the three-dimensional coordinate system with the intersected line as the ith axis is recorded as XiThen executing step two-4;
② 4, determining the Y axis in the three-dimensional coordinate system of the ith axis according to the right-hand rule, and recording as YiAnd obtaining the three-dimensional coordinate system of the ith axis.
In the second step, the process of establishing the three-dimensional coordinate system of the ith axis is as follows:
② -1) taking the axis of the ith shaft as the Z shaft in the three-dimensional coordinate system of the ith shaft, and recording as Zi;
Secondly-2) if the ith shaft is the 1 st shaft, selecting the axis and Z of the ith shaft on the axis of the ith shaft0Is taken as the origin and is marked as OiThen executing step two-3); if the ith shaft is not the 1 st shaft, selecting a point intersecting with a common perpendicular line of the axis of the ith shaft and the axis of the (i-1) th shaft as an origin point on the axis of the ith shaft, and recording the point as OiThen executing step two-3);
② -3), judging whether the ith shaft is the 1 st shaft or not, if so, making the ith shaft parallel to the axis of the ith shaft and Z0Perpendicular to the origin OiThe X axis in the three-dimensional coordinate system with the intersected line as the ith axis is recorded as XiThen executing step two-4); otherwise, it will be parallel to the ith rootAxis of the shaft and axis of the i-1 th shaft are on a common perpendicular line and are perpendicular to the origin OiThe X axis in the three-dimensional coordinate system with the intersected line as the ith axis is recorded as XiThen executing step two-4);
② -4) determining the Y axis in the three-dimensional coordinate system of the ith axis according to the right-hand rule, and recording as YiAnd obtaining the three-dimensional coordinate system of the ith axis.
Compared with the prior art, the invention has the advantages that:
1) the method comprises the steps of establishing a three-dimensional coordinate system of each axis in the numerical control machine, then obtaining the shortest distance and the included angle between the adjacent Z axes and the shortest distance and the included angle between the adjacent X axes on the basis of the three-dimensional coordinate system of each axis, then obtaining a transformation matrix between the two adjacent three-dimensional coordinate systems, and finally establishing a kinematics model of the numerical control machine according to the transformation matrix.
2) The method has the advantages of simple modeling process and low calculation complexity.
3) When the kinematic model established by the method is used for processing an object with a more complex contour, if the contour is known, the change information of the cutter can be determined firstly, and then the motion information (the rotation angle or the translation distance) of each axis can be obtained in a reverse pushing mode, so that the object can be processed according to the motion information of each axis, the contour of the processed object can be reflected more truly, the processing track is continuous and smooth, and the processing precision can be effectively improved.
Detailed Description
The invention is described in further detail below with reference to the accompanying examples.
The first embodiment is as follows:
the general implementation block diagram of the general kinematics modeling method for the numerical control machine tool provided by the embodiment is shown in fig. 1, and the general kinematics modeling method specifically includes the following steps:
firstly, a reference three-dimensional coordinate system of the numerical control machine tool is established, and then the spatial position of each axis in the numerical control machine tool is determined in the reference three-dimensional coordinate system of the numerical control machine tool.
Here, the axes in the numerical control machine tool include all axes making rotational motion and all axes making translational motion.
The purpose of determining the spatial position of the axes is here simply to establish a three-dimensional coordinate system for each axis.
Determining a three-dimensional coordinate system of a machine tool base and a three-dimensional coordinate system of a cutter in the numerical control machine tool, and correspondingly recording an X axis, a Y axis and a Z axis in the three-dimensional coordinate system of the machine tool base as X0、Y0And Z0Let X, Y and Z axes in the three-dimensional coordinate system of the tool correspond to each other as XN+1、YN+1And ZN+1(ii) a Then establishing a three-dimensional coordinate system of each axis in the numerical control machine tool according to the spatial position of each axis in the numerical control machine tool, and correspondingly recording an X axis, a Y axis and a Z axis in the three-dimensional coordinate system of the ith axis as X axisi、YiAnd ZiWherein i is more than or equal to 1 and less than or equal to N, and N represents the total number of the shafts in the numerical control machine tool.
The three-dimensional coordinate system of a machine tool base and the three-dimensional coordinate system of a cutter in the numerical control machine tool are determined by the prior art; in this embodiment, the three-dimensional coordinate system of the machine tool base is the reference three-dimensional coordinate system established in step (i).
In this embodiment, the process of establishing the three-dimensional coordinate system of the ith axis is as follows:
② -1, taking the axis of the ith axis as the Z axis in the three-dimensional coordinate system of the ith axis, and recording as Zi。
2, selecting any point on the axis of the ith shaft as the origin of the three-dimensional coordinate system of the ith shaft, and recording the point as Oi。
Secondly-3, judging whether the ith shaft is the 1 st shaft or not, if so, enabling the ith shaft to be parallel to the axis of the ith shaft and Z0Perpendicular to the origin OiThe X axis in the three-dimensional coordinate system with the intersected line as the ith axis is recorded as XiThen executing step two-4; otherwise, it will be parallel to the common perpendicular to the axis of the ith shaft and the axis of the (i-1) th shaft, and to the origin OiThe X axis in the three-dimensional coordinate system with the intersected line as the ith axis is recorded as XiThen executing step two-4; .
② 4, determining the Y axis in the three-dimensional coordinate system of the ith axis according to the right-hand rule, and recording as YiAnd obtaining the three-dimensional coordinate system of the ith axis.
In the process of establishing the three-dimensional coordinate system of each axis, the directions of an X axis, a Y axis and a Z axis in the three-dimensional coordinate system do not need to be specified, a user can decide by himself, and the difference of the directions of the X axis, the Y axis and the Z axis only enables the finally obtained models to be different, but does not affect the modeling process and the use of the established models.
Thirdly, calculating the Z axis Z in the three-dimensional coordinate system of the 1 st axis1And Z0The shortest distance and angle between them, the correspondence being denoted as dz1And alpha1(ii) a Calculating the shortest distance and included angle between Z axes in the three-dimensional coordinate system of two adjacent axes, and calculating the Z axis Z in the three-dimensional coordinate system of the jth axisjZ axis Z in three-dimensional coordinate system with j-1 th axisj-1The shortest distance and the corresponding included angle between them are recorded as dzjAnd alphajAs shown in FIG. 2, where j is 2. ltoreq. N; calculating ZN+1Z axis Z in three-dimensional coordinate system with Nth axisNThe shortest distance and angle between them, the correspondence being denoted as dzN+1And alphaN+1。
Calculating the X-axis X in the 1 st axis three-dimensional coordinate system1And X0The shortest distance and included angle between, the correspondence is denoted dx1And theta1(ii) a Calculating the shortest distance and included angle between X axes in the three-dimensional coordinate systems of two adjacent axes, and calculating the X axis X in the three-dimensional coordinate system of the jth axisjAnd the X axis X in the three-dimensional coordinate system of the j-1 th axisj-1The shortest distance and the angle correspondence between them are denoted dxjAnd thetajAs shown in FIG. 2, where j is 2. ltoreq. N; calculating XN+1X-axis X in three-dimensional coordinate system with Nth axisNThe shortest distance and included angle between, the correspondence is denoted dxN+1And thetaN+1。
Iv according to dz1、α1、dx1And theta1Constructing a transformation matrix between the three-dimensional coordinate system of the 1 st axis and the three-dimensional coordinate system of the machine base, and recording the transformation matrix as, <math>
<mrow>
<mmultiscripts>
<mi>T</mi>
<mn>1</mn>
<mn>0</mn>
</mmultiscripts>
<mo>=</mo>
<mfenced open='[' close=']'>
<mtable>
<mtr>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mo>-</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dz</mi>
<mn>1</mn>
</msub>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mo>-</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dz</mi>
<mn>1</mn>
</msub>
<mo>×</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mn>1</mn>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dx</mi>
<mn>1</mn>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
</mtable>
</mfenced>
<mo>,</mo>
</mrow>
</math> Wherein cos () is a cosine function and sin () is a sine function.
Constructing a transformation matrix between three-dimensional coordinate systems of two adjacent axes, and recording the transformation matrix between the three-dimensional coordinate system of the jth axis and the three-dimensional coordinate system of the jth-1 axis as the transformation matrix
,
<math>
<mrow>
<mmultiscripts>
<mi>T</mi>
<mi>j</mi>
<mrow>
<mi>j</mi>
<mo>-</mo>
<mn>1</mn>
</mrow>
</mmultiscripts>
<mo>=</mo>
<mfenced open='[' close=']'>
<mtable>
<mtr>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mo>-</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dz</mi>
<mi>j</mi>
</msub>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mo>-</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dz</mi>
<mi>j</mi>
</msub>
<mo>×</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mi>j</mi>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dx</mi>
<mi>j</mi>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
</mtable>
</mfenced>
<mo>,</mo>
</mrow>
</math> Wherein j is more than or equal to 2 and less than or equal to N.
According to dz
N+1、α
N+1、dx
N+1And theta
N+1Constructing a transformation matrix between the three-dimensional coordinate system of the tool and the three-dimensional coordinate system of the Nth axis, and recording the transformation matrix as
,
<math>
<mrow>
<mmultiscripts>
<mi>T</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
<mi>N</mi>
</mmultiscripts>
<mo>=</mo>
<mfenced open='[' close=']'>
<mtable>
<mtr>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mo>-</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dz</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mo>-</mo>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
<mo>×</mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dz</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo></mo>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>θ</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<msub>
<mi>α</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
<mo>)</mo>
</mrow>
</mtd>
<mtd>
<msub>
<mi>dx</mi>
<mrow>
<mi>N</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</msub>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
</mtable>
</mfenced>
<mo>.</mo>
</mrow>
</math>
Establishing kinematic model of numerically controlled machine tool and recording as
Wherein,
a transformation matrix between the three-dimensional coordinate system of the 2 nd axis and the three-dimensional coordinate system of the 1 st axis,
and representing a transformation matrix between the three-dimensional coordinate system of the Nth axis and the three-dimensional coordinate system of the (N-1) th axis, wherein j is more than or equal to 2 and less than or equal to N.
Example two:
the modeling method provided by the embodiment is the same as the modeling method provided by the embodiment in the overall implementation process, and the difference is only that the process for establishing the three-dimensional coordinate system of the ith axis is different. In this embodiment, the process of establishing the three-dimensional coordinate system of the ith axis is as follows:
② -1) taking the axis of the ith shaft as the Z shaft in the three-dimensional coordinate system of the ith shaft, and recording as Zi。
Secondly-2) if the ith shaft is the 1 st shaft, selecting the axis and Z of the ith shaft on the axis of the ith shaft0Is taken as the origin and is marked as OiThen executing step two-3); if the ith shaft is not the 1 st shaft, selecting a point intersecting with a common perpendicular line of the axis of the ith shaft and the axis of the (i-1) th shaft as an origin point on the axis of the ith shaft, and recording the point as OiThen step 2-3) is performed.
② -3), judging whether the ith shaft is the 1 st shaft or not, if so, making the ith shaft parallel to the axis of the ith shaft and Z0Perpendicular to the origin OiThe X axis in the three-dimensional coordinate system with the intersected line as the ith axis is recorded as XiThen step two-4) is performed, in fact X hereiI.e. the axis of the ith shaft and Z0The male vertical line of (a); otherwise, it will be parallel to the common perpendicular to the axis of the ith shaft and the axis of the (i-1) th shaft, and to the origin OiThe X axis in the three-dimensional coordinate system with the intersected line as the ith axis is recorded as XiThen step two-4) is performed, in fact X hereiIs the firstThe axis of the i shafts and the common perpendicular line of the axis of the (i-1) th shaft.
② -4) determining the Y axis in the three-dimensional coordinate system of the ith axis according to the right-hand rule, and recording as YiAnd obtaining the three-dimensional coordinate system of the ith axis.
In this embodiment, the origin is selected according to the axis of the current shaft and a common perpendicular line between the axis of the current shaft and the axis of the previous shaft (when the current shaft is not the 1 st shaft) or the Z axis (when the current shaft is the 1 st shaft) in the three-dimensional coordinate system of the machine tool base, and this origin selection method can simplify the parameters to the utmost, thereby effectively reducing the computational complexity of the modeling method and reducing the computation time.
Compared with the first embodiment and the second embodiment, the modeling method provided by the second embodiment has lower computational complexity and shorter computation time.