Tool Frame Calibration for Robot-Assisted Ultrasonic Testing

Tool frame calibration has been widely used in robot-assisted printing, welding, and grinding, but it is not suitable for ultrasonic testing because the robot is submerged in water. The purpose of this paper is to present a tool frame calibration method, which is suitable for improving the precision of ultrasonic testing. In uniform mediums, sound travels along a straight line like ray. A reflector is fixed in water to reflect ultrasound, which makes it possible to measure distances between incidence points on a reflector and tool center point (TCP) on an ultrasound transducer. In addition, the positions and poses of the end flange are recorded through a robot controller. Finally, an optimization method is applied to calculate the position and pose errors of the tool frame relative to the end flange according to such records. The presented method was implemented in an ultrasonic testing system. We selected 100 incidence points on the reflector to calculate the assembly errors of the transducer. The pulse amplitude rose obviously after calibration, which verifies that this is an effective method. Considering that ultrasonic transducers can be used as a measuring tool, this paper proposes a tool frame calibration method for ultrasonic testing robots without introducing other measuring devices, which draws the conclusion that tool frame can be calibrated through ultrasound.


Introduction
Ultrasonic testing (UT) is used to detect defects in materials based on the principle of ultrasonic propagation.In the early days, UT was mainly used to ensure product quality.Now, it has been improved for use as an evaluation approach to predict potential risks [1].The part under test is placed in water and a multi-axial manipulator grasping transducer moves over the part to scan the surface.Frame-type scan machines are widely used as manipulators.However, there are some limitations to such machines when scanning complex structures [2].Then, general industrial robots were introduced [3].These are more flexible to achieve complex motions compared to frame-type scan machines.
It is necessary to teach robots paths before running.There are two kinds of teaching methods, i.e., on-line teaching and off-line teaching.Off-line teaching is operated in simulation software, which is more flexible and efficient compared to on-line teaching.However, nominal coordinates inputted in the software may deviate from actual situations due to manufacturing error, assembly error, and so on.These errors cause actual paths to deviate from simulated paths.
Tool assembly error is a cause of path deviation.Some tool frame calibrations have been designed to reduce deviations.For example, Xiaozhi et al. presented a matrixsolving hand-eye calibration method using a laser scanner as a measuring tool to enhance the robotic machining accuracy of complex free form surfaces [4].Guo et al. calibrated kinematic parameters for an industrial robot using a laser displacement sensor [5].Lin et al. proposed an enhanced automatic TCP calibration method based on a laser displacement sensor, achieving the purpose of being simple, economical, and time-saving [6].Similarly, assembly errors in ultrasonic transducers will influence testing precision.It is necessary to design a method to calibrate tool frames for robot-assisted ultrasonic testing.
Many measuring devices with different complexity and cost have been applied in robot calibration.In the early days, some appropriative measuring devices were designed.For example, Renders et al. designed an experimental setup using one magnetostrictive sensor to measure longitudinal displacement and two magnetic transducers to measure transversal displacement [7].Driels et al. designed a wire potentiometer to measure robot partial pose, which could be used to calibrate PUMA 560 robots [8].With the development of sensor technology, some universal measuring devices with high precision were applied, including the displacement sensor [9], complementary metal oxide semiconductor (CMOS) camera [10], laser tracker [11], laser interferometer [12], coordinate measuring machine (CMM) [13], etc.On the other hand, some optimization methods for solving non-linear problems have been used for robot calibration.Linear least-squares algorithm was employed for parameter identification to calibrate selective compliance assembly robot arm (SCARA) and a tree-typed modular robot [14].Omodei et al. used nonlinear optimization, iterative linearization, and extended Kalman filter to identify kinematic parameters of SCARA [15].Peng et al. used minimal linear combinations to analyze end-effector error and then used linear forecast real-time error compensation to decrease the error [16].
In this research, an ultrasonic transducer grasped by a robot was used as measuring device.A kinematic model was built based on the D-H model.The distance between the transducer and reflector was measured according to time-of-flight (TOF).In error calculation, a constrained non-linear optimization problem, was translated into an unconstrained linear optimization problem.Finally, the assembly errors were identified after several iterations.The experimental results demonstrate that it was feasible to measure and calibrate this tool frame using an ultrasonic robot.The presented method makes it easier to calibrate tool frames for robot-assisted ultrasonic testing system.

System Construction
In 2002, Hongwei et al. designed an ultrasonic testing system using a frame-type scan machine as manipulator [17].It was capable of scanning simple and continuous geometry, but useless for complex curved geometry.A six-degree-of-freedom (DOF)-articulated robot can make up for such shortcomings [18].The construction of robot-assisted ultrasonic testing system is shown in Figure 1.It consists of three modules: the motion module, the testing module, and the auxiliary module.In the motion module, the industrial robot grasps the transducer scanning over the part.A robot controller is used for motion control and servo drive.The testing module consists of a pulse transmitting-receiving device and transducer.The auxiliary module includes a tank and some other support structures.Positional and signal data are fed into computer for data acquisition, processing, and presentation.assembly errors in ultrasonic transducers will influence testing precision.It is necessary to design a method to calibrate tool frames for robot-assisted ultrasonic testing.Many measuring devices with different complexity and cost have been applied in robot calibration.In the early days, some appropriative measuring devices were designed.For example, Renders et al. designed an experimental setup using one magnetostrictive sensor to measure longitudinal displacement and two magnetic transducers to measure transversal displacement [7].Driels et al. designed a wire potentiometer to measure robot partial pose, which could be used to calibrate PUMA 560 robots [8].With the development of sensor technology, some universal measuring devices with high precision were applied, including the displacement sensor [9], complementary metal oxide semiconductor (CMOS) camera [10], laser tracker [11], laser interferometer [12], coordinate measuring machine (CMM) [13], etc.On the other hand, some optimization methods for solving nonlinear problems have been used for robot calibration.Linear least-squares algorithm was employed for parameter identification to calibrate selective compliance assembly robot arm (SCARA) and a tree-typed modular robot [14].Omodei et al. used nonlinear optimization, iterative linearization, and extended Kalman filter to identify kinematic parameters of SCARA [15].Peng et al. used minimal linear combinations to analyze end-effector error and then used linear forecast real-time error compensation to decrease the error [16].
In this research, an ultrasonic transducer grasped by a robot was used as measuring device.A kinematic model was built based on the D-H model.The distance between the transducer and reflector was measured according to time-of-flight (TOF).In error calculation, a constrained non-linear optimization problem, was translated into an unconstrained linear optimization problem.Finally, the assembly errors were identified after several iterations.The experimental results demonstrate that it was feasible to measure and calibrate this tool frame using an ultrasonic robot.The presented method makes it easier to calibrate tool frames for robot-assisted ultrasonic testing system.

System Construction
In 2002, Hongwei et al. designed an ultrasonic testing system using a frame-type scan machine as manipulator [17].It was capable of scanning simple and continuous geometry, but useless for complex curved geometry.A six-degree-of-freedom (DOF)-articulated robot can make up for such shortcomings [18].The construction of robot-assisted ultrasonic testing system is shown in Figure 1.It consists of three modules: the motion module, the testing module, and the auxiliary module.In the motion module, the industrial robot grasps the transducer scanning over the part.A robot controller is used for motion control and servo drive.The testing module consists of a pulse transmitting-receiving device and transducer.The auxiliary module includes a tank and some other support structures.Positional and signal data are fed into computer for data acquisition, processing, and presentation.The robot is fixed on the ground and the part under test is placed in water.The transducer is installed on the end-effector of the robot.Frames are built on components, Sensors 2023, 23, 8820 3 of 11 including the robot base frame {B}, end-effector frame {E}, tool frame {T}, and part frame {P}, to describe spatial relationships.All points on the parts are described relative to {B} for consistency.The tool frame calibration identifies errors between actual values and nominal values of the tool frame, and errors are due to assembly.Nominal values need to be adjusted during the off-line teaching.

Optimization-Based Calibration Method
The kinematic model describes the motion of objects without considering mass and forces.Denavit and Hartenberg presented the D-H model using four parameters associated with a particular convention to describe the position and pose of spatial links.Though many models were developed hereafter, such as the modified D-H (MDH) model, zero reference model, S model, and CPC model, the D-H model remains a popular approach.In this research, the D-H model is used to implement calibration.The values of the tool frame are calculated through an optimization algorithm.

Robot Kinematic Model
A Staubli-TX90XL industrial robot was used in this research and its structure is shown in Figure 2. The ultrasonic transducer was installed on end-effector of the robot.The frames were built on the base, links, end-effector, and transducer in line with the convention of the DH model.
The robot is fixed on the ground and the part under test is placed in water.The transducer is installed on the end-effector of the robot.Frames are built on components, including the robot base frame {B}, end-effector frame {E}, tool frame {T}, and part frame {P}, to describe spatial relationships.All points on the parts are described relative to {B} for consistency.The tool frame calibration identifies errors between actual values and nominal values of the tool frame, and errors are due to assembly.Nominal values need to be adjusted during the off-line teaching.

Optimization-Based Calibration Method
The kinematic model describes the motion of objects without considering mass and forces.Denavit and Hartenberg presented the D-H model using four parameters associated with a particular convention to describe the position and pose of spatial links.Though many models were developed hereafter, such as the modified D-H (MDH) model, zero reference model, S model, and CPC model, the D-H model remains a popular approach.In this research, the D-H model is used to implement calibration.The values of the tool frame are calculated through an optimization algorithm.

Robot Kinematic Model
A Staubli-TX90XL industrial robot was used in this research and its structure is shown in Figure 2. The ultrasonic transducer was installed on end-effector of the robot.The frames were built on the base, links, end-effector, and transducer in line with the convention of the DH model.The spatial relationship of two adjacent frames is described by homogeneous transformation matrix The spatial relationship of two adjacent frames is described by homogeneous transformation matrix T i i−1 : where θ i , A i , d i and α i in Equation ( 1) are DH parameters: θ i is the joint angle from the X i−1 axis to the X i axis about the Z i−1 axis; A i is the offset distance from the Z i−1 axis to the Z i axis along the X i axis; d i is the joint distance from the X i−1 axis to the X i axis along xZ i−1 axis; α i is the offset angle from the Z i−1 axis to the Z i axis about the X i axis.The values of the D-H parameters are listed in Table 1.
Table 1.DH Parameters of Staubli-TX90XL industrial robot.Bringing above values into Equation ( 1), the spatial relationships of two adjacent links were determined as shown in Equation ( 2), where c i and s i are a simplification of cosθ i and sinθ i .
Furthermore, the spatial relationships of two arbitrary links were calculated through matrix multiplication.For example, the relationship between frames {E} and {B} in Figure 2 is expressed as Equation ( 3) is simplified as where R E B and P E B describe the pose and position of {E} relative to {B}.Similarly, the relationship between {T} and {B} is expressed as where R T B and P T B describe the pose and position of {T} relative to {B}; T T E describes spatial relationship between {T} and {E}.The tool frame calibration in this research was to correct values in T T E .

Error Calibration
Laser trackers, CMM, and other measuring devices have been widely used to calibrate the tool frame in robotic systems.In this research, an ultrasonic transducer was introduced to calibrate the tool frame, which is uncommon in previous reports.
Ultrasonic transducers are sound-electricity converting components based on the piezoelectric effect in semiconductor elements.In the transmitting state, the pulse transmittingreceiving device transmits a narrow-pulse to drive the transducers.Then, the device turns into the receiving state and a series of echoes is received and converted into electrical signal.The driving pulse and subsequent echoes received with different incidence distances and angles are shown in Figure 3. Comparing Figure 3a,b, the TOF between the driving pulse and surface echo pulse changes linearly with the distance between transducer and reflector; comparing Figure 3a,c, the amplitude of the echo pulse decreases when the incident beam deflects a certain angle from the normal direction.Consequently, the distance between the transducer and the reflector can be measured based on the principle of ultrasonic propagation when it is conducted in homogeneous mediums like water. 1

Error Calibration
Laser trackers, CMM, and other measuring devices have been widely used to calibrate the tool frame in robotic systems.In this research, an ultrasonic transducer was introduced to calibrate the tool frame, which is uncommon in previous reports.
Ultrasonic transducers are sound-electricity converting components based on the piezoelectric effect in semiconductor elements.In the transmitting state, the pulse transmitting-receiving device transmits a narrow-pulse to drive the transducers.Then, the device turns into the receiving state and a series of echoes is received and converted into electrical signal.The driving pulse and subsequent echoes received with different incidence distances and angles are shown in Figure 3. Comparing Figure 3a,b, the TOF between the driving pulse and surface echo pulse changes linearly with the distance between transducer and reflector; comparing Figure 3a,c, the amplitude of the echo pulse decreases when the incident beam deflects a certain angle from the normal direction.Consequently, the distance between the transducer and the reflector can be measured based on the principle of ultrasonic propagation when it is conducted in homogeneous mediums like water.In Figure 4, there is a fixed spatial relationship between the robot and the reflector.The ultrasonic beam transmits Δl along Z axis of {T} and intersects at point N on the reflector.A frame {N} is fixed at point N to describe the position and pose of N in space.It In Figure 4, there is a fixed spatial relationship between the robot and the reflector.The ultrasonic beam transmits ∆l along Z axis of {T} and intersects at point N on the reflector.A frame {N} is fixed at point N to describe the position and pose of N in space.It can be inferred from Equation ( 5) and coordinate conversion that the position and pose of N relative to {B} is The measuring process is shown in Figure 4. m incidence points were selected on the reflector.The transducer grasped by the robot was moved to the selected points with different poses.The spatial data of {E} relative to {B} were recorded in each point, and then the data were taken into Equation ( 11) and an optimization problem was established as 1 0 : Equations ( 12) and ( 13) constitute a non-linear optimization problem, which is difficult to solve directly.They were transformed into a linear optimization problem without constraint, which can be solved according to essential and sufficient conditions.
According to first-order essential condition, the objective and constrain function were rewritten together making up a Lagrange function: (14) among which λ is noted as a Lagrange multiplier.Assuming that t* is an optimal solution, f(t) and c(t) are continuous and differentiable in the neighbourhood of t*, then there is a λ* satisfying: ( ) Equation ( 15) transforms a non-linear optimization problem with equality constraint into a linear optimization problem that is solved by iteration.While t* acquired from iterations could be an extremal point, it needed to be further confirmed through second-order sufficient condition.The Hesse matrix relative to the Lagrange function was used.If it was a positive definite matrix when taking t* into Hesse matrix, then t* was confirmed as an extremal point.Consequently, t* was the corrected coordinates of {T} relative to {E}, which are the calibration results.

Experiment Results
An experimental platform in line with Section 2 was established, as shown in Figure 5, to verify the proposed calibration.The industrial robot used in the experiment was produced by Staubli International AG (Pfäffikon, Switzerland), model TX90XL.The pulse transmitting-receiving device is an ultrasonic pulser/receiver produced by Olympus Corporation (Tokyo, Japan), model 5077PR.An ultrasonic transducer with a frequency of 25 MHz and an element size of 6 mm was selected.The model of the transducer is V324-SU-F5.25IN, which was also produced by Olympus Corporation.The elements of the matrixes in Equation ( 6) are The elements above have following relationship: Among which, (n and (p E x , p E y , p E z ) are calculated according to the position feedback from the robot controller and ∆l is measured by the transducer.(a T x , a T y , a T z ) is a unit vector that satisfies a constrain: All incidence points on the reflector, such as N, are in line with a plane equation.Assuming that, there are three points on the reflector, noted as A (x A , y A , z A ), B (x B , y B , z B ), and C (x C , y C , z C ).The normal vector of the reflector is described as The plane equation is determined through the coordinates of A, B, and C, which are described as shown in Figure 4 is in line with Equation (10): Sensors 2023, 23, 8820 The values of t (p T x , p T y , p T z , a T x , a T y , a T z ) are unknown when taking Equation ( 7) into Equation (11).A measure and calculation process was designed to acquire the values.
The measuring process is shown in Figure 4. m incidence points were selected on the reflector.The transducer grasped by the robot was moved to the selected points with different poses.The spatial data of {E} relative to {B} were recorded in each point, and then the data were taken into Equation ( 11) and an optimization problem was established as Constrain f unction : Equations ( 12) and ( 13) constitute a non-linear optimization problem, which is difficult to solve directly.They were transformed into a linear optimization problem without constraint, which can be solved according to essential and sufficient conditions.
According to first-order essential condition, the objective and constrain function were rewritten together making up a Lagrange function: among which λ is noted as a Lagrange multiplier.Assuming that t* is an optimal solution, f (t) and c(t) are continuous and differentiable in the neighbourhood of t*, then there is a λ* satisfying: Equation ( 15) transforms a non-linear optimization problem with equality constraint into a linear optimization problem that is solved by iteration.While t* acquired from iterations could be an extremal point, it needed to be further confirmed through secondorder sufficient condition.The Hesse matrix relative to the Lagrange function was used.If it was a positive definite matrix when taking t* into Hesse matrix, then t* was confirmed as an extremal point.Consequently, t* was the corrected coordinates of {T} relative to {E}, which are the calibration results.

Experiment Results
An experimental platform in line with Section 2 was established, as shown in Figure 5, to verify the proposed calibration.The industrial robot used in the experiment was produced by Staubli International AG (Pfäffikon, Switzerland), model TX90XL.The pulse transmitting-receiving device is an ultrasonic pulser/receiver produced by Olympus Corporation (Tokyo, Japan), model 5077PR.An ultrasonic transducer with a frequency of 25 MHz and an element size of 6 mm was selected.The model of the transducer is V324-SU-F5.25IN, which was also produced by Olympus Corporation.It was demonstrated in Section 3 that all the incidence points on the reflector in line with a plane equation and the equation can be determined through three points on the reflector.Contact measuring was implemented, as shown in Figure 6, to acquire the coordinates of the three points.A standard tool was installed on the end-effector and a board (20 mm × 30 mm) was fixed in water.It was demonstrated in Section 3 that all the incidence points on the reflector in line with a plane equation and the equation can be determined through three points on the reflector.Contact measuring was implemented, as shown in Figure 6, to acquire the coordinates of the three points.A standard tool was installed on the end-effector and a board (20 mm × 30 mm) was fixed in water.It was demonstrated in Section 3 that all the incidence points on the reflector in line with a plane equation and the equation can be determined through three points on the reflector.Contact measuring was implemented, as shown in Figure 6, to acquire the coordinates of the three points.A standard tool was installed on the end-effector and a board (20 mm × 30 mm) was fixed in water.Measuring steps 1-4 are repeated three times to reduce the influence of deformation when contacting the board.In addition, the standard tool can be replaced with a laser sensor to avoid deformation, but the measuring steps need to be implemented before Measuring steps 1-4 are repeated three times to reduce the influence of deformation when contacting the board.In addition, the standard tool can be replaced with a laser sensor to avoid deformation, but the measuring steps need to be implemented before pouring water into the tank.The coordinates of points are shown in Table 2.The plane equation calculated according to the points is −0.0088x−0.13y+ 0.99z + 864.81 = 0 (16) Then, the standard tool was replaced with an ultrasonic transducer and the board was used as a reflector as shown in Figure 7.The robot was operated by moving over the   Several points were selected from 100 incidence points to calculate the coordinates of the tool frame based on the optimization algorithm presented in Section 3. The number of selected points was increased by ten each time from 1 to 100.The position errors along each axis and the angle errors around each axis between the calculated values and nominal values are shown in Figure 8a,b.The trend in the curves in Figure 8 demonstrate that the position and angle error decreased with the number of selected points.Consequently, fewer points can not obtain stable results and the calculated results' trend become stable when the selected points are greater than 70.The calibration results are shown in Table 3.Several points were selected from 100 incidence points to calculate the coordinates of the tool frame based on the optimization algorithm presented in Section 3. The number of selected points was increased by ten each time from 1 to 100.The position errors along each axis and the angle errors around each axis between the calculated values and nominal values are shown in Figure 8a,b.The trend in the curves in Figure 8 demonstrate that the position and angle error decreased with the number of selected points.Consequently, fewer points can not obtain stable results and the calculated results' trend become stable when the selected points are greater than 70.The calibration results are shown in Table 3.If there is a slight offset between the beam and the normal direction of the reflector, pulse amplitude will descend as shown in Figure 3c.This principle can be used to verify the effectiveness of the calibration method.The pulse amplitudes of the 100 incidence points before and after calibration are shown in Figure 9.The pulse amplitude of each measuring point after calibration is higher than that before calibration, which demonstrates that this is an effective calibration method.If there is a slight offset between the beam and the normal direction of the reflector, pulse amplitude will descend as shown in Figure 3c.This principle can be used to verify the effectiveness of the calibration method.The pulse amplitudes of the 100 incidence points before and after calibration are shown in Figure 9.The pulse amplitude of each measuring point after calibration is higher than that before calibration, which demonstrates that this is an effective calibration method.

Conclusions
Assembly errors in the transducer installed on a robot will influence ultrasonic testing precision.In this work, a tool frame calibration method based on ultrasonic principles is presented.The tool frame can be calibrated using a piece of board, which is economical and easily operated.Four conclusions are drawn as follows: (1) A robot-assisted system which is more suitable to test complex curved parts compared with frame-type scan machines is proposed.(2) The DH model is used to describe the statical relationship of each component.The tool frame calibration is modelled and translated into a mathematical problem to calculate the values in T T E .(3) The calculation is described as a constrained non-linear optimization problem, then it is transformed into a linear optimization problem that can be solved by iteration.(4) In this experiment, we find that the incidence points should be scattered on the reflector; the propagation distance should be different on each incidence point; and the transducer pose should be distributed in different angles.
The ultrasonic transducer can only measure distance in a single direction.Assembly errors are calculated by iteration.Though the calibration accuracy of this method is lower than that of universal measuring devices, such as laser trackers or coordinate measuring machines, it is suitable for underwater applications.Our future work will aim at improve the iteration accuracy.

Figure 1 .
Figure 1.Configuration of robot-assisted ultrasonic testing system.Figure 1. Configuration of robot-assisted ultrasonic testing system.

Figure 1 .
Figure 1.Configuration of robot-assisted ultrasonic testing system.Figure 1. Configuration of robot-assisted ultrasonic testing system.

B
describe the pose and position of {T} relative to {B}; T T E describes spatial relationship between {T} and {E}.The tool frame calibration in this research was to correct values in T T E .

Figure 3 .
Figure 3. Waveform of ultrasonic with different distance and angle.

Figure 3 .
Figure 3. Waveform of ultrasonic with different distance and angle.

Figure 4 .
Figure 4. Measuring distance between transducer and reflector.

Figure 4 .
Figure 4. Measuring distance between transducer and reflector.

Figure 6 .
Figure 6.Contact measuring through standard tool to acquire plane equation.The specific measuring steps were as follows: Step 1: The robot is operated by making the standard tool contact the board with an arbitrary pose; Step 2: The position coordinates of the contact point (such as A) relative to {B} are calculated through equation (6); Step 3: Step 1 and 2 are repeated three times to acquire the position coordinates of point A, B, and C. Step 4: The plane equation is calculated according to equation (10).

Figure 6 .
Figure 6.Contact measuring through standard tool to acquire plane equation.The specific measuring steps were as follows: Step 1 The robot is operated by making the standard tool contact the board with an arbitrary pose; Step 2 The position coordinates of the contact point (such as A) relative to {B} are calculated through equation (6); Step 3 Step 1 and 2 are repeated three times to acquire the position coordinates of point A, B, and C. Step 4 The plane equation is calculated according to Equation (10).
different pose.During the operation 100 points and corresponding TOF were recorded.

Figure 7 .
Figure 7. Non-contact measuring through ultrasonic transducer to acquire distance.

Figure 7 .
Figure 7. Non-contact measuring through ultrasonic transducer to acquire distance.

Sensors 2023 , 12 Figure 8 .
Figure 8. Position and angle errors of tool frame with different number of measuring points.

Figure 8 .
Figure 8. Position and angle errors of tool frame with different number of measuring points.

Figure 8 .
Figure 8. Position and angle errors of tool frame with different number of measuring points.

Figure 9 .
Figure 9.Comparison of pulse amplitude before and after calibration.Figure 9. Comparison of pulse amplitude before and after calibration.

Figure 9 .
Figure 9.Comparison of pulse amplitude before and after calibration.Figure 9. Comparison of pulse amplitude before and after calibration.

Table 2 .
Coordinates of nine points.

Table 3 .
Tool frame calibration results.

Table 3 .
Tool frame calibration results.

Table 3 .
Tool frame calibration results.