Knowledge / Machine tool metrology

Homogeneous Transformation Matrices (HTMs) for Modeling the Geometric Errors of Numerically Controlled Axes and Machines: A Quick Reference

Keywords: Homogeneous Transformation Matrix (HTM), geometric errors, virtual machine tool (VMT), geometric error modeling

The error terms used in these matrices are defined on Geometric Errors of Machines, and the matrices are applied in Reconfigurable Data Driven Virtual Machine Tool.

Linear Axes: X, Y & Z

$$_X^{REF}T=\begin{bmatrix} 1 & -e_{CX} & e_{BX} & x+e_{XX} \\ e_{CX} & 1 & -e_{AX} & e_{YX}+x \cdot E_{COX} \\ -e_{BX} & e_{AX} & 1 & e_{ZX} - x \cdot E_{BOX} \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(1)
$$_Y^{REF}T=\begin{bmatrix} 1 & -e_{CY} & e_{BY} & e_{XY} - y \cdot E_{COY} \\ e_{CY} & 1 & -e_{AY} & y + e_{YY} \\ -e_{BY} & e_{AY} & 1 & e_{ZY} + y \cdot E_{AOY} \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(2)
$$_Z^{REF}T=\begin{bmatrix} 1 & -e_{CZ} & e_{BZ} & e_{XZ} + z \cdot E_{BOZ}\\ e_{CZ} & 1 & -e_{AZ} & e_{YZ} - z \cdot E_{AOZ} \\ -e_{BZ} & e_{AZ} & 1 & z + e_{ZZ} \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(3)

Rotary Axes: A-Axis Transformation Matrices

$$_A^{REF}T=\left[_A^{REF}T^{loc}\right]\left[_A^{REF}T^{ori}\right]\left[_A^{REF}T^{dev}\right]\left[_A^{REF}T^{rot}\right]$$
(4)

A-Axis Rotation Matrices

$$_A^{REF}T_{XYZ}^{rot}=\left[_A^{REF}R_Z\right]\left[_A^{REF}R_Y\right]\left[_A^{REF}R_X\right]$$
(5)
$$_A^{REF}R_X=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & cos(A+e_{AA}) & -sin(A+e_{AA}) & 0 \\ 0 & sin(A+e_{AA}) & cos(A+e_{AA}) & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(6)
$$_A^{REF}R_Y=\begin{bmatrix} cos(e_{BA}) & 0 & sin(e_{BA}) & 0 \\ 0 & 1 & 0 & 0 \\ -sin(e_{BA}) & 0 & cos(e_{BA}) & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(7)
$$_A^{REF}R_Z=\begin{bmatrix} cos(e_{CA}) & -sin(e_{CA}) & 0 & 0 \\ sin(e_{CA}) & cos(e_{CA}) & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(8)

A-Axis Linear Transformation Matrices: Location & Deviation

$$_A^{REF}T^{loc}=\begin{bmatrix} 1 & 0 & 0 & XOA + E_{XOA} \\ 0 & 1 & 0 & YOA + E_{YOA} \\ 0 & 0 & 1 & ZOA + E_{ZOA} \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(9)
$$_A^{REF}T^{dev}=\begin{bmatrix} 1 & 0 & 0 & e_{XA} \\ 0 & 1 & 0 & e_{YA} \\ 0 & 0 & 1 & e_{ZA} \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(10)

A-Axis Orientation Matrices

$$_A^{REF}T_{XYZ}^{ori}=\left(_A^{REF}R_Z^{ori}\right)\left(_A^{REF}R_Y^{ori}\right)\left(_A^{REF}R_X^{ori}\right)$$
(11)
$$_A^{REF}R_X^{ori}=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & cos(AOA+E_{AOA}) & -sin(AOA+E_{AOA}) & 0 \\ 0 & sin(AOA+E_{AOA}) & cos(AOA+E_{AOA}) & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(12)
$$_A^{REF}R_Y^{ori}=\begin{bmatrix} cos(BOA+E_{BOA}) & 0 & sin(BOA+E_{BOA}) & 0 \\ 0 & 1 & 0 & 0 \\ -sin(BOA+E_{BOA}) & 0 & cos(BOA+E_{BOA}) & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(13)
$$_A^{REF}R_Z^{ori}=\begin{bmatrix} cos(COA+E_{COA}) & -sin(COA+E_{COA}) & 0 & 0 \\ sin(COA+E_{COA}) & cos(COA+E_{COA}) & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(14)

B-Axis Transformation Matrices

$$_B^{REF}T=\left[_B^{REF}T^{loc}\right]\left[_B^{REF}T^{ori}\right]\left[_B^{REF}T^{dev}\right]\left[_B^{REF}T^{rot}\right]$$
(15)

B-Axis Rotation Matrices

$$_B^{REF}T_{YXZ}^{rot}=\left[_B^{REF}R_Z\right]\left[_B^{REF}R_X\right]\left[_B^{REF}R_Y\right]$$
(16)
$$_B^{REF}R_X=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & cos(e_{AB}) & -sin(e_{AB}) & 0 \\ 0 & sin(e_{AB}) & cos(e_{AB}) & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(17)
$$_B^{REF}R_Y=\begin{bmatrix} cos(B+e_{BB}) & 0 & sin(B+e_{BB}) & 0 \\ 0 & 1 & 0 & 0 \\ -sin(B+e_{BB}) & 0 & cos(B+e_{BB}) & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(18)
$$_B^{REF}R_Z=\begin{bmatrix} cos(e_{CB}) & -sin(e_{CB}) & 0 & 0 \\ sin(e_{CB}) & cos(e_{CB}) & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(19)

B-Axis Linear Transformation Matrices: Location & Deviation

$$_B^{REF}T^{loc}=\begin{bmatrix} 1 & 0 & 0 & XOB + E_{XOB} \\ 0 & 1 & 0 & YOB + E_{YOB} \\ 0 & 0 & 1 & ZOB + E_{ZOB} \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(20)
$$_B^{REF}T^{dev}=\begin{bmatrix} 1 & 0 & 0 & e_{XB} \\ 0 & 1 & 0 & e_{YB} \\ 0 & 0 & 1 & e_{ZB} \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(21)

B-Axis Orientation Matrices

$$_B^{REF}T_{XYZ}^{ori}=\left(_B^{REF}R_Z^{ori}\right)\left(_B^{REF}R_Y^{ori}\right)\left(_B^{REF}R_X^{ori}\right)$$
(22)
$$_B^{REF}R_X^{ori}=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & cos(AOB+E_{AOB}) & -sin(AOB+E_{AOB}) & 0 \\ 0 & sin(AOB+E_{AOB}) & cos(AOB+E_{AOB}) & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(23)
$$_B^{REF}R_Y^{ori}=\begin{bmatrix} cos(BOB+E_{BOB}) & 0 & sin(BOB+E_{BOB}) & 0 \\ 0 & 1 & 0 & 0 \\ -sin(BOB+E_{BOB}) & 0 & cos(BOB+E_{BOB}) & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(24)
$$_B^{REF}R_Z^{ori}=\begin{bmatrix} cos(COB+E_{COB}) & -sin(COB+E_{COB}) & 0 & 0 \\ sin(COB+E_{COB}) & cos(COB+E_{COB}) & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(25)

C-Axis Transformation Matrices

$$_C^{REF}T=\left[_C^{REF}T^{loc}\right]\left[_C^{REF}T^{ori}\right]\left[_C^{REF}T^{dev}\right]\left[_C^{REF}T^{rot}\right]$$
(26)

C-Axis Rotation Matrices

$$_C^{REF}T_{ZYX}^{rot}=\left[_C^{REF}R_X\right]\left[_C^{REF}R_Y\right]\left[_C^{REF}R_Z\right]$$
(27)
$$_C^{REF}R_X=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & cos(e_{AC}) & -sin(e_{AC}) & 0 \\ 0 & sin(e_{AC}) & cos(e_{AC}) & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(28)
$$_C^{REF}R_Y=\begin{bmatrix} cos(e_{BC}) & 0 & sin(e_{BC}) & 0 \\ 0 & 1 & 0 & 0 \\ -sin(e_{BC}) & 0 & cos(e_{BC}) & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(29)
$$_C^{REF}R_Z=\begin{bmatrix} cos(C+e_{CC}) & -sin(C+e_{CC}) & 0 & 0 \\ sin(C+e_{CC}) & cos(C+e_{CC}) & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(30)

C-Axis Linear Transformation Matrices: Location & Deviation

$$_C^{REF}T^{loc}=\begin{bmatrix} 1 & 0 & 0 & XOC + E_{XOC} \\ 0 & 1 & 0 & YOC + E_{YOC} \\ 0 & 0 & 1 & ZOC + E_{ZOC} \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(31)
$$_C^{REF}T^{dev}=\begin{bmatrix} 1 & 0 & 0 & e_{XC} \\ 0 & 1 & 0 & e_{YC} \\ 0 & 0 & 1 & e_{ZC} \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(32)

C-Axis Orientation Matrices

$$_C^{REF}T_{XYZ}^{ori}=\left(_C^{REF}R_Z^{ori}\right)\left(_C^{REF}R_Y^{ori}\right)\left(_C^{REF}R_X^{ori}\right)$$
(33)
$$_C^{REF}R_X^{ori}=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & cos(AOC+E_{AOC}) & -sin(AOC+E_{AOC}) & 0 \\ 0 & sin(AOC+E_{AOC}) & cos(AOC+E_{AOC}) & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(34)
$$_C^{REF}R_Y^{ori}=\begin{bmatrix} cos(BOC+E_{BOC}) & 0 & sin(BOC+E_{BOC}) & 0 \\ 0 & 1 & 0 & 0 \\ -sin(BOC+E_{BOC}) & 0 & cos(BOC+E_{BOC}) & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(35)
$$_C^{REF}R_Z^{ori}=\begin{bmatrix} cos(COC+E_{COC}) & -sin(COC+E_{COC}) & 0 & 0 \\ sin(COC+E_{COC}) & cos(COC+E_{COC}) & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(36)

Spindles, (C), Transformation Matrices

$$_{(C)}^{REF}T=\left[_{(C)}^{REF}T^{loc}\right]\left[_{(C)}^{REF}T^{ori}\right]$$
(37)

Spindle Location Matrix

$$_{(C)}^{REF}T^{loc}=\begin{bmatrix} 1 & 0 & 0 & E_{XO(C)} \\ 0 & 1 & 0 & E_{YO(C)} \\ 0 & 0 & 1 & E_{ZO(C)}\\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(38)

Spindle Orientation Matrix

$$_{(C)}^{REF}T_{XYZ}^{ori}=\begin{bmatrix} 1 & 0 & E_{BO(C)} & 0 \\ 0 & 1 & -E_{AO(C)} & 0 \\ -E_{BO(C)} & E_{AO(C)} & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(39)

Workpiece, w, Transformation Matrices

$$_w^{REF}T=\left[_w^{REF}T^{loc}\right]\left[_w^{REF}T^{ori}\right]\,_w^wP$$
(40)

Workpiece Location Matrix

$$_w^{REF}T^{loc}=\begin{bmatrix} 1 & 0 & 0 & XOw+E_{XOw} \\ 0 & 1 & 0 & YOw+E_{YOw} \\ 0 & 0 & 1 & ZOw+E_{ZOw}\\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(41)

Workpiece Orientation Matrices

$$_w^{REF}T_{XYZ}^{ori}=\left(_w^{REF}R_Z^{ori}\right)\left(_w^{REF}R_Y^{ori}\right)\left(_w^{REF}R_X^{ori}\right)$$
(42)
$$_w^{REF}R_X^{ori}=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & cos(AOw+E_{AOw}) & -sin(AOw+E_{AOw}) & 0 \\ 0 & sin(AOw+E_{AOw}) & cos(AOw+E_{AOw}) & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(43)
$$_w^{REF}R_Y^{ori}=\begin{bmatrix} cos(BOw+E_{BOw}) & 0 & sin(BOw+E_{BOw}) & 0 \\ 0 & 1 & 0 & 0 \\ -sin(BOw+E_{BOw}) & 0 & cos(BOw+E_{BOw}) & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(44)
$$_w^{REF}R_Z^{ori}=\begin{bmatrix} cos(COw+E_{COw}) & -sin(COw+E_{COw}) & 0 & 0 \\ sin(COw+E_{COw}) & cos(COw+E_{COw}) & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(45)
$$_w^{w}P=\begin{bmatrix} _w^{w}P_X \\ _w^{w}P_Y \\ _w^{w}P_Z \\ 1 \\ \end{bmatrix}$$
(46)

where

  • \(_w^{w}P_X\) is the X-axis coordinate in the workpiece coordinate frame,
  • \(_w^{w}P_Y\) is the Y-axis coordinate in the workpiece coordinate frame, and
  • \(_w^{w}P_Z\) is the Z-axis coordinate in the workpiece coordinate frame.

Tool, t, Transformation Matrices

$$_t^{REF}T=\left[_t^{REF}T^{loc}\right]\left[_t^{REF}T^{ori}\right]\,_t^tP$$
(47)

Tool Location Matrix

$$_t^{REF}T^{loc}=\begin{bmatrix} 1 & 0 & 0 & XOt+E_{XOt} \\ 0 & 1 & 0 & YOt+E_{YOt} \\ 0 & 0 & 1 & ZOt+E_{ZOt}\\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(48)

Tool Orientation Matrices

$$_t^{REF}T_{XYZ}^{ori}=\left(_t^{REF}R_Z^{ori}\right)\left(_t^{REF}R_Y^{ori}\right)\left(_t^{REF}R_X^{ori}\right)$$
(49)
$$_t^{REF}R_X^{ori}=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & -E_{AOt} & 0 \\ 0 & E_{AOt} & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(50)
$$_t^{REF}R_Y^{ori}=\begin{bmatrix} 1 & 0 & E_{BOt} & 0 \\ 0 & 1 & 0 & 0 \\ -E_{BOt} & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(51)
$$_t^{REF}R_Z^{ori}=\begin{bmatrix} 1 & -E_{COt} & 0 & 0 \\ E_{COt} & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(52)
$$_t^{REF}T_{XYZ}^{ori}=\begin{bmatrix} 1 & -E_{COt} & E_{BOt} & 0 \\ E_{COt} & 1 & -E_{AOt} & 0 \\ -E_{BOt} & E_{AOt} & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{bmatrix}$$
(53)
$$_t^{t}P=\begin{bmatrix} _t^{t}P_X \\ _t^{t}P_Y \\ _t^{t}P_Z \\ 1 \\ \end{bmatrix}$$
(54)

where

  • \(_t^{t}P_X\) is the X-axis coordinate in the tool coordinate frame,
  • \(_t^{t}P_Y\) is the Y-axis coordinate in the tool coordinate frame, and
  • \(_t^{t}P_Z\) is the Z-axis coordinate in the tool coordinate frame.