1. Introduction
Robotic machining work cells offer numerous advantages, including spacious working spaces, enhanced flexibility, and cost-effectiveness [
1,
2]. The large working spaces and flexibility of robotic ability make them suitable as a new intelligent and automated machining platform in machining large-scale products, such as turbine blades and aerospace products [
3,
4]. The robotic machining system necessitates a thorough calibration procedure to enhance the precision of coordinate dimensions for improved positioning calibration and alignment of robot measurement and machining systems, which have gained increasing significance as a research area and have been extensively explored by numerous scholars in recent years [
5,
6].
Calibrating the coordinate system of a robotic machining system is typically achieved through 3D vision, a laser tracker [
7], and contact-based measurement methods. Wu [
8] introduced a two-stage method for hand-eye calibration utilizing a laser tracker. They employed the Gauss–Newton (G-N) method for iterative solutions to enhance calibration accuracy, demonstrating its effectiveness and superiority over methods that rely on full pose data. Wang [
9] addressed the challenge of dual robot hand-eye calibration by presenting an innovative approach to solving the equation AXB = YCZ with unknown variables. This method combines two simultaneous calibration techniques for pose parameters: one using a closed-form approach based on the Kronecker product and the other employing a numerical iterative approach with the stochastic variance reduced gradient algorithm (SVRG). Xie [
10] also introduced a two-step geometric calibration method suitable for freeform surfaces as calibration objects. A coarse-to-fine calibration approach is proposed to simultaneously calibrate the hand-eye pose and kinematic parameters. However, if a calibration method cannot establish an initial solution through a closed-form approach and instead directly resorts to an iterative method, with an arbitrary initial solution chosen for computation, it may lead to non-convergence of the algorithm or convergence to only a local optimum. Both Sun [
11] and Xu [
12] proposed a method for calibrating the tool frame and the workpiece frame, primarily employing a ruby probe to satisfy the requirements for grinding complex workpieces with a robot. Solving the parameters of the nonlinear system of equations resulting from the sphere-to-sphere calibration method can be a challenging task. Transforming the equation set into a nonlinear least-squares problem, the function may not always be convex.
The calibration of the above method ultimately transforms into solving a least squares problem. In solving nonlinear least squares problems, Newton method and quasi-Newton methods [
13,
14,
15] are the most classical approaches for solving systems of nonlinear equations Nevertheless, such methods still fall under the category of local optimization techniques. When the function is convex, these methods deliver excellent solving performance, but in the case of non-convex functions, the solution process may converge to a local convergence and fail to achieve the global convergence. The global convergence algorithm for non-convex functions addresses global optimization problems. Non-convex global optimization algorithms can be categorized into two main groups. The first category consists of deterministic global optimization algorithms, such as the parameter-filled method [
16], branch-and-bound algorithms [
17], and the DIRECT algorithm [
18,
19,
20], which do not rely on randomness. The second category comprises stochastic global optimization algorithms, which introduce randomness to facilitate global exploration and escape from local optima. These stochastic optimization algorithms are typically based on heuristic techniques, including the multistart algorithm [
21], simulated annealing algorithm [
22], firefly algorithm [
23], genetic algorithm [
24], grey wolf algorithm [
25], whale algorithm [
26], among others. However, a drawback of these intelligent or heuristic algorithms is their relatively low computational efficiency and result uncertainty. Moreover, contemporary research widely acknowledges the No Free Lunch (NFL) theorem [
27], which posits that there is no universally applicable algorithm that can deliver the optimal solution for every optimization problem. In the context of specific optimization problems, there is always a demand for identifying the optimal optimization method.
Given that some of the aforementioned algorithms perform poorly in terms of achieving global convergence, while others have low solving efficiency, they may not be fully suitable for the optimization problem discussed in this paper. For specific optimization problems, designing a suitable hybrid optimization algorithm can leverage the strengths of both algorithms, significantly improving optimization performance and surpassing the effectiveness of a single algorithm. In the calibration process, the objective of solving the NLS problem is to balance computational efficiency and global convergence. To achieve this, we plan to adopt a hybrid algorithm that combines two different iterative optimization algorithms [
28,
29,
30]. The hybrid optimization algorithm will have a stronger global convergence capability, while ensuring algorithm efficiency, making the calibration process faster and more accurate.
To fulfill the intricate machining requirements of large and complex structural components, this paper initiates a robotic machining system designed for combined milling and polishing. For workpieces fixed with flexible fixtures, a calibration method is proposed that combines the ease of vision-based positioning with the precision of contact-based positioning. Secondly, a robotic contact probe calibration model is established, and a system of nonlinear equations is formulated for the probe calibration. An investigation is carried out on numerical iterative methods for solving this system of nonlinear equations, with a specific focus on convergence, iteration speed, sensitivity to initial values, and the global convergence capability using various algorithms. Thirdly, we introduced a hybrid optimization algorithm, the LM-D algorithm, which is based on the L-M and DIRECT algorithms. In comparison to traditional algorithms, the LM-D algorithm demonstrates reduced reliance on initial values, robust global convergence capabilities, and faster iteration speeds. It proves to be effective in addressing problems related to this type of nonlinear equation system. Finally, calibration experiments are conducted, and experimental data is obtained to validate the effectiveness of this algorithm.
2. The Robotic Machining System and Combined Calibration Method
The structure of the robotic milling and polishing composite machining system is shown in
Figure 1, which includes an industrial robot, KUKA KR 210, a rotary worktable, a 3D vision calibration system, an electric spindle, a pneumatic floating spindle, a quick-change tool magazine, an electric spindle tool magazine, a pneumatic spindle tool magazine, and a rapid workpiece clamping mechanism. The electric spindle can hold milling tools to perform machining on workpieces, such as milling of residual burring, and it can also hold some brushes for polishing tasks. The pneumatic floating spindle can support specific polishing tools. The 3D vision calibration system can identify relevant features of the workpiece for rapid coarse positioning, and then precise calibration of the workpiece coordinate system is achieved by using a ruby probe.
The entire robot processing workflow is as follows:
- (1)
The workpiece is fixed using the rapid workpiece clamping mechanism, and the rotary worktable transports the workpiece to the processing area.
- (2)
The 3D vision calibration system scans the workpiece to locate its features and perform preliminary positioning. The probe is used to detect the workpiece features for precise positioning, determining the transformation between the workpiece coordinate and the robot base coordinate.
- (3)
The processing path for the workpiece is programmed offline, and interaction with the process database is carried out. Depending on the different processing positions and techniques, suitable processing tools are selected. This generates the robot processing path, which is then uploaded to the robot controller.
- (4)
The robot commences the processing task. Once the processing process is complete, the rotary worktable is started, and the workpiece is transported to the manual area for dismantling.
The workpiece calibration process is a critical step to ensure processing precision. Whether it’s the milling or polishing process, there are high demands for the calibration accuracy of the entire system. The cost-effective, wide-view 3D vision products typically offer a matching and positioning accuracy of ±2 mm for workpieces. Using higher-precision visual equipment or laser scanning products is often prohibitively expensive and operationally complex. On the other hand, using contact-based devices directly for calibration requires manual robot teaching each time, given the arbitrary positioning of workpieces. This method is labor-intensive, places high demands on operators, and does not satisfy the requirements for automated robotic measurement operations. In addressing existing technological limitations, this paper introduces a method that blends the ease of visual positioning with the precision of contact-based positioning. It leverages affordable 3D vision products for initial workpiece coordinate placement, establishing the approximate workpiece coordinate system. Following this, a robot employs a contact-based probe for precise workpiece positioning in the rapid workpiece positioning system.
The entire calibration process is divided into two major steps: (1) coarse calibration of 3D visual system, (2) precise calibration of contact measurement.
The 3D coarse calibration determines the approximate position of the workpiece, guiding the robot for precise positioning. The principle of 3D visual coarse calibration is illustrated in
Figure 2: {B} represents the robot base coordinate system, {W} represents the workpiece coordinate system, {C} represents the initial coordinate system of the 3D camera, and {C
1} refers to the coordinate system of the 3D camera after moving on the XY Dual-Axis servo module. The relationship between {C
1} and {C} is defined by a translation transformation
. Firstly, it checks whether updates are needed for the 3D camera calibration. If updates are required, the 3D camera captures a point cloud of the workpiece. Since the camera view cannot cover the entire workpiece, an XY Dual-Axis servo module is used to move the 3D camera in sections, completing a panoramic merge after capture. Next, the collected point cloud data features are matched with the training template’s point cloud features, calculating the difference between the actual workpiece pose and the training template workpiece pose. Finally, this difference is compensated into the initially established workpiece coordinate system to achieve workpiece coarse positioning.
The contact-based calibration method represents the final step in calibrating the workpiece. Therefore, the precision of the calibration achieved with the contact-based method directly impacts the accuracy of workpiece positioning.
Figure 3 illustrates the principle of using a contact probe to calibrate a hole feature. The probe touches the sidewall sequentially, recording points of contact, with a minimum of three points measured on the feature to calculate the coordinates of the center.
The workflow for the robot to calibrate the workpiece using a probe is as follows:
- (1)
The machining robot retrieves the Renishaw probe tool from the tool magazine and activates the probe tool.
- (2)
Based on the preliminary position coordinates of the workpiece feature obtained from the 3D visual system coarse calibration, the robot acquires the initial position coordinates for the feature to be calibrated.
- (3)
The robot uses the contact probe to sequentially measure the corresponding workpiece features.
- (4)
An accurate workpiece coordinate system {W} is established, completing the precise workpiece positioning.
Since robot contact-based calibration is the final step and directly affects the accuracy of workpiece positioning, improving the precision of robot contact-based positioning is of vital significance for enhancing the overall precision of robot machining. To accomplish contact-based calibration, the precise calibration of the probe’s TCP is the initial and crucial step.
3. The Sphere-to-Sphere TCP Calibration Model
The traditional TCP calibration method employs a point-to-point calibration method, with the general principles of the conventional 4-point calibration method outlined in the literature [
12]. This method involves manipulating the robot to bring the TCP tip into contact with fixed points in at least four different orientations, and the industrial robot computes the TCP data based on the positional data of these points. The more calibration points are used, the higher the precision of the TCP points obtained through fitting. However, the point-to-point calibration method has some drawbacks, including the difficulty of strictly achieving point-to-point procedures manually, resulting in calibration and fitting inaccuracies. Therefore, the method may introduce accumulative errors in subsequent tool and workpiece coordinate system calibration, consequently affecting calibration accuracy.
To overcome the inherent limitations of the traditional method, this paper employs a sphere-to-sphere calibration method as a replacement for the conventional point-to-point method, effectively mitigating errors arising from manual operations. This method uses a ruby probe sphere instead of a traditional tip pointed calibration rod, as illustrated in
Figure 4. A standard sphere is mounted on a magnetic base, and the robot grips the probe. Through the calibration procedure, the robot moves in various orientations toward the standard sphere. Upon contact between the ruby sphere and the standard sphere, a trigger signal is generated, and the robot controller immediately records the current robot pose, accurately achieving the sphere-to-sphere calibration process.
Different from the point-to-point calibration method, when calibrating using standard spheres. The traditional solving methods cannot be applied due to
. A calibration model is established with the standard sphere as the reference target.
where
is the position of the standard sphere center in the base coordinate, with its value unknown;
R and
r are the radius of the standard sphere and the ruby probe;
is the position of the probe TCP in the robot base coordinate {B}, with
i representing the number of calibration contact points. After the calibration process is completed, the TCP position can be further expressed as
where
is the TCP position parameter to be determined for the ruby probe;
is the homogeneous transformation matrix from the robot wrist end tool
0 coordinate {E} to the robot base coordinate {B}, which can be obtained from the robot controller. Equation (2) can be expressed as
After expanding Equation (3), it can be simplified to
After transforming Equation (1), we can establish the objective function as follows:
In theory, the more measurement points available, the higher the precision of the TCP obtained through the least squares method. To achieve optimal results, we seek to minimize the 2-norm of the objective function. This optimization problem transforms into a nonlinear least squares problem.
Meanwhile, during the actual calibration and the summary of the calibration data, we identified the following characteristics:
The obtained calibration results must be the global optimum. If the algorithm converges to a local optimum or fails to converge, it can lead to catastrophic consequences for subsequent measurement processes, rendering it unacceptable.
During the calibration process, the function involved may be a multi-dimensional, non-convex continuous function.
Controllable noise is mixed into the calibration data. When the noise level is low, the high-dimensional space housing both the global optimal solution and other local optimal solutions becomes more concentrated.
Based on the volume of calibration data collected, a termination criterion for assessing result convergence can be established through the norm of residuals in the least squares method. A large norm suggests a deviation from the global optimal solution or issues with the calibration data, leading to the rejection of the final iteration results. Conversely, a small norm indicates successful convergence of the results.
When addressing the aforementioned NLS optimization problem, the function may exhibit multiple local minima. If the algorithm fails to achieve global convergence, it can result in inaccurate calibration outcomes. Hence, the dependable determination of the global optimal solution for the function, while maintaining a balance between computational efficiency and result accuracy, becomes crucial. This entails devising appropriate solution methods derived from the aforementioned characteristics, and it holds significant importance in achieving precise TCP calibration results.
4. The New Hybrid Optimization Algorithm
4.1. L-M Algorithm
The iterative method stands out as a fundamental approach for resolving nonlinear systems of equations. Among these methods, the Gauss–Newton (G-N) algorithm emerges as one of the most classical and straightforward techniques in optimization. An advancement upon the G-N algorithm is the L-M algorithm, which can be regarded as a synthesis of the G-N algorithm and gradient descent.
The L-M algorithm differs slightly from the G-N algorithm in terms of the iterative step size:
where
μ represents the damping parameter. For all
µ > 0, the coefficient matrix is positive, and this ensures that
is a descent direction. If
μ is large, the main diagonal elements dominate, and the function approximates first-order gradient descent. When
μ decreases, it approaches the G-N algorithm.
The L-M algorithm has defined indicators to evaluate the approximate effect of the model:
The denominator represents the descent in the approximate model, while the numerator represents the descent in the actual function. When ρ approaches 1, the approximation is considered good. Conversely, if ρ is too small, the approximation is deemed poor. If ρ is relatively large, the penalty factor μ can be reduced, allowing the algorithm to become closer to the G-N algorithm in the next iteration. On the other hand, if ρ is very small or negative, indicating a poor approximation, the penalty factor needs to be increased and the step size reduced, making the algorithm resemble the steepest descent method.
The flowchart for solving the nonlinear least squares problem in
Section 3 using the L-M algorithm is shown in
Figure 5, where
is the threshold for the incremental equation and
is the minimum step size.
The L-M algorithm has demonstrated an ability to attain the desired iterative outcomes with relatively swift convergence. Nevertheless, it is important to note that the L-M algorithm is commonly regarded as a local optimization technique, leaving it susceptible to converging to a local optimum. This tendency is particularly pronounced when dealing with substantial noise in the data or when the iterative process confronts local minima in the function. In such scenarios, the L-M algorithm may struggle to converge to the global optimum.
4.2. The Direct Algorithm
The DIRECT algorithm stands out as a deterministic global optimization algorithm designed for addressing problems with bound constraints, making it particularly well suited for solving global optimization problems. Notably, it exhibits low demands on the objective function and finds applicability in addressing global optimization problems characterized by continuous functions. Nevertheless, it is crucial to acknowledge that attaining global convergence through the DIRECT algorithm may necessitate extensive and comprehensive searches within the domain. The algorithm’s fundamental operation revolves around the iterative selection of hyperrectangles and subsequent subdivision. The flowchart for solving the nonlinear least squares problem in
Section 3 using the DIRECT algorithm is shown in
Figure 6.
When the location of the global optimum point is uncertain, employing the DIRECT algorithm requires defining a broad search space for constrained optimization. This can lead to an excessively large search range, subsequently escalating computational costs. Another notable drawback is the asymptotically ineffective characteristic of the DIRECT algorithm. The DIRECT algorithm can efficiently explore the absorption region, containing both local and global optimal solutions, with a relatively modest computational cost. However, achieving close proximity to or reaching the optimal solution requires a substantial computational investment.
Intelligent algorithms, such as the Simulated Annealing (SA) algorithm, incorporate random methods, which can lead to lower solving efficiency and challenges in meeting the requirements of online usage. Uncertainties may arise during the iterative process, and, in the pursuit of efficiency, achieving the optimal solution through iteration might pose challenges. Similarly, to ensure that the algorithm identifies the global optimum, there might be a trade-off involving a decrease in computational efficiency.
4.3. The LM-D Algorithm
Due to the inherent limitations of the previously mentioned algorithms, they may not be entirely suitable for the optimization problem outlined in this paper. Given the unique characteristics of robot calibration in practical scenarios, local optimization algorithms typically suffice to converge to the global optimum in most cases, leading to calibration parameters that deviate from the actual parameters. In such situations, the incorporation of global optimization algorithms becomes necessary to ensure convergence to the global optimum.
Hence, we propose the development of a hybrid algorithm, denoted as the LM-D algorithm, to tackle this issue. The LM-D algorithm integrates the L-M algorithm with the DIRECT algorithm in a mutually iterative process aimed at achieving the global optimum. This approach effectively harmonizes the local search efficiency characteristic of the L-M algorithm with the global convergence capability of the DIRECT algorithm. The complete hybrid algorithm comprises two distinct stages: the local minimization stage and the escape from local minima stage. In the local minimization stage, the L-M algorithm is applied for local optimization, followed by the utilization of the DIRECT algorithm to escape from local minima. Initially, we utilize the L-M algorithm to ascertain a local solution. Subsequently, in order to surpass the constraints of this local optimum, we employ iterative steps through the DIRECT algorithm to unveil a solution superior to the current local optimum. This newly discovered point serves as the initial reference for commencing a new search utilizing the L-M algorithm. This cyclical process persists until the algorithm converges to the global optimum, a condition met when the parameter ε, functioning as the threshold for the global optimum, is satisfied. Typically, the accuracy of robotic following absolute calibration hovers around 0.2 mm. When the iterative result falls below 0.1 mm, the iteration is considered to have converged to the global optimum, and the current iterative result is accepted.
This method does not necessitate an exceedingly accurate initial solution and is capable of initiating iterative calculations from any starting position. It demonstrates rapid convergence, even when the initial solution is not in close proximity to the problem’s solution, showcasing robustness in its performance. In response to the characteristics of robotic TCP calibration, we have implemented the following improvements to the aforementioned two algorithms.
4.3.1. The Improvement Strategy L-M Algorithm
In the initialization process, given the unknown initial values, arbitrary initial values are set, as in this paper, where the initial values are set to (0, 0, 0, 0, 0, 0). The improved algorithm incorporates a convergence criterion to determine whether the algorithm has converged to the global optimum.
If the result satisfies the convergence criterion, it means that the L-M algorithm has converged to the global optimum, and the result can be directly output. If the global optimum criterion is not met, it indicates that the L-M algorithm has converged to a local optimum. Subsequently, the algorithm transitions to the DIRECT algorithm. The local minimum point and its corresponding value , acquired through the L-M algorithm, serve as the initial data. These data are then conveyed to the DIRECT algorithm through their respective interfaces, laying the groundwork for the ensuing computation.
4.3.2. The Improvement Strategy of the DIRECT Algorithm
As previously explained, if the L-M algorithm identifies only a local minimum for the function, the DIRECT algorithm holds the potential to find a smaller function value. To realize this objective, we integrate the DIRECT algorithm with essential modifications.
The first improvement of the algorithm is the addition of a control parameter μ, which governs the search range. By configuring the control parameter μ governing the search range, we can regulate the extent of the search space. Commencing with an initial value of μ, the search is initially confined to a narrow range. In the event that a smaller local minimum eludes discovery, an attempt is made to adjust the value of the control parameter μ, progressively broadening the search scope.
The second improvement of the algorithm is the establishment of a new termination criterion for the loop:
Following the completion of each iteration loop, the parameters xk and are updated and is compared with . If , this suggests that during this iteration, a superior solution compared to the L-M algorithm has not been identified. In this case, the next iteration continues until the termination condition is satisfied. The iterative loop commences with a narrow search range. If a smaller local minimum is not identified, we progressively expand the search space by μ until the maximum search range is reached. When , it signifies that the current iteration has discovered a superior solution compared to the L-M algorithm, suggesting that the algorithm has transitioned beyond the local minimum basin within the L-M algorithm. At this point, the iterative loop can be concluded, the DIRECT algorithm exited and xk can be employed as the initial parameter value. Subsequently, it can be input into the L-M algorithm for further iterations to continue the search for a local optimum.
The improvement strategy in the DIRECT algorithm eliminates the need for a global optimum. It solely focuses on identifying the new parameter xk that satisfies to exit the loop. Leveraging the attributes of the DIRECT algorithm, it can promptly pinpoint regions within the constraint range likely to harbor optimal solutions, particularly in the initial phases of the algorithm. Consequently, it adeptly circumvents the issue of asymptotic ineffectiveness, swiftly uncovering a solution surpassing the local optimum attained by the L-M algorithm.
4.3.3. The Interactive Part of Algorithm
To integrate these algorithms, it is essential to implement suitable adjustments to the hybrid algorithm, incorporating the exchange of data between the L-M algorithm and the DIRECT algorithm. The L-M algorithm communicates data regarding the local optimum to the DIRECT algorithm and confirms if the algorithm has reached the maximum iteration. Concurrently, when the DIRECT algorithm acquires parameters that fulfill the criteria, it transfers these new parameters to the L-M algorithm via the interaction component. The comprehensive flow diagram of the hybrid algorithm is depicted in
Figure 7.
Moreover, it is crucial to emphasize that even with the hybrid algorithm, a definitive guarantee of achieving calibration parameters meeting the global convergence threshold cannot be ensured. If the hybrid algorithm ultimately falls short of meeting the criteria for the global optimum, it indicates potential challenges in the calibration process. These challenges might stem from the introduction of inaccurate data into the data set or the presence of excessive noise, leading to iterated results that fail to meet the required standards. In such instances, the calibration results are unreliable, necessitating either a recalibration or the elimination of erroneous data, noise reduction, or other corrective measures to satisfy the calibration accuracy requirements before progressing with the solution.
5. Calibration Experiment and Algorithm Comparison
5.1. Data Acquisition for Calibration
To assess the optimization effects of the designed LM-D algorithm, data collection is the initial step. The calibration experimental setup, depicted in
Figure 8, has been established. The ABB IRB 6660-1.95 robot model is employed in the experiment. A standard sphere with a diameter of 38.05 mm is utilized, and the probe model is the RENISHAW OMP40-2, with a nominal repeatability of 1 μm, aligning with the calibration accuracy requirements of the robot. The probe is affixed to the corresponding tool holder, and the robotic end effector is equipped with a spindle. Upon automatically retrieving the tool holder from the tool library, the robot initiates the TCP calibration program, automatically deploys the probe, and traverses to various positions and orientations concerning the standard sphere through the program. When the ruby probe makes contact with the standard sphere, it triggers a signal, and the current robot pose is promptly recorded through the robot controller, precisely executing the sphere-to-sphere process. Subsequently, the robot returns to the Home position and commences the next point measurement, repeating this cycle until all predefined measurement points are covered. A total of 10 data sets were amassed through the TCP calibration experiment. The specific data, illustrated in data 1, 2, and 3 in
Table A1,
Table A2 and
Table A3, for three sets of data, encompass the tool
0 position and quaternion parameters for each measurement point.
In the analysis of the data sets from data 2 in
Table A2, within a designated hyperspace following space discretization, we compute the optimal solution for each discrete point. Given that hyperspace cannot be visually represented in a three-dimensional graph, we present a schematic depiction of the general relationship between TCP parameters X, Y, and the function value in
Figure 9. The purpose is to visualize the situations of local and global optima in the function. From the graph. From the graph, it is discernible that a local minimum is situated in the vicinity of point P1 at (615, −30) in the function values X, Y, while the global minimum is approximate to point P at (585, −5). This observation aligns with the characteristics of the calibration function for the probe’s TCP, as discussed earlier, suggesting its classification within the non-convex function category. Consequently, jumping out of local optima and pursuing the global optimum becomes imperative in optimizing the calibration process. We provide this
Figure 9 to visually illustrate the issue of multiple local minima in the data. In practical algorithm use, it is not necessary to draw it.
5.2. Data Solving and Analysis
We applied the LM-D algorithm to address the data and conducted a comparative analysis with the L-M algorithm, DIRECT algorithm, and SA algorithm. Each of these methods holds distinct typicality. The L-M algorithm embodies a conventional approach for local optima, the DIRECT algorithm serves as a direct global optimization algorithm, and the SA algorithm stands as an intelligent optimization algorithm. The computer employed for the experiment is an ASUS ROG Zephyrus M16 equipped with an Intel Core i7-12700H CPU and 16GB of memory. To ensure solution efficiency, a time constraint is imposed. We set the maximum iteration time to T
max = 3600 s. If an algorithm surpasses the 3600 s threshold, it is deemed a timeout, prompting the termination of the iteration, and the final result is generated. Following the establishment of initial parameters, we initiate the iterative calculation process. To further validate the effectiveness of the LM-D algorithm, we conducted experiments using data 1, 2, and 3. These data sets are representative of typical cases. Data 1 is used to verify the convergence and efficiency of various algorithms when there is only a single local optimum. Data 2 and 3 represent cases with multiple local optima. In data 2, the multiple local minima are closely spaced, and the LM-D algorithm demonstrates global convergence while showing faster efficiency compared to the SA algorithm. Data 3, on the other hand, involves multiple local minima that are more widely spaced. Due to the significant differences in the solving principles of the above algorithms, we have plotted separate images for the convergence of each algorithm. The convergence of four different algorithms for processing data 1, 2, and 3 is shown in
Figure 10. In this case, only the LM-D algorithm succeeds in achieving global convergence, which highlights its stronger global convergence capability compared to other algorithms.
The optimization results and comparisons for data 1, 2, 3 are presented in
Table 1. The L-M algorithm is characterized by its fast convergence speed; however, the final result may either converge globally or become stuck in a local optimum. On the other hand, the LM-D algorithm has a slightly slower average iteration speed compared to the L-M algorithm but is faster than the DIRECT algorithm and the SA algorithm. Additionally, the LM-D algorithm also achieves direct convergence to the global optimum. Nevertheless, employing the DIRECT algorithm and the SA algorithm resulted in excessively prolonged iteration times, and the iteration outcomes failed to converge to the optimal solution. In the case of the DIRECT algorithm, the absence of a more precise initial solution necessitates the definition of a larger constraint range to encompass the global optimum. Boundaries are set as bounds = [0 1000; −500 500; −500 500; 0 2000; 0 500; 0 500]. Solving within an expanded constraint space inevitably demands more computational resources, leading to extended computation times. Furthermore, the asymptotically ineffective characteristic of DIRECT restricts convergence. Consequently, within the T
max time, the final results fall short of attaining the optimal F(X
i) compared to the LM-D algorithm, indicating the failure of the algorithm to converge to the optimum solution within the preset time. The SA algorithm, while possessing global optimization capabilities, relies on a Monte Carlo based random approach, introducing inherent uncertainty. Balancing computational efficiency and global convergence during the solving process is challenging. If parameters are adjusted to enhance efficiency, the final iteration results may lack global convergence. Conversely, prioritizing global convergence significantly elevates computational costs.
During the analysis of data 3, it is notable that the runtime of the LM-D algorithm experienced a significant increase. This can be attributed to the LM-D algorithm engaging in two rounds of DIRECT iterations to escape from local optima. In both iterations, the DIRECT algorithm adeptly identified solutions smaller than the prevailing local optimum, underscoring the robust capacity of the DIRECT algorithm to evade local optima. The imposition of an initial search interval confined within hyperrectangles with a side length of less than 100mm markedly reduced the search range compared to the direct application of the DIRECT method. This reduction contributed to shorter overall iteration times.
From the above data sets (data 1, 2, and 3), it is clear that there is a significant difference in the convergence speed of the LM-D algorithm. In data 1, since the local optimum is also the global optimum, the LM-D algorithm converges to the global optimum using only the L-M part of the algorithm. In this case, the LM-D algorithm degenerates into the L-M algorithm, resulting in a fast solution. In data 2 and data 3, where multiple local optima exist, the LM-D algorithm interacts through iterations between the L-M algorithm and the DIRECT algorithm. Therefore, the algorithm takes longer to run. The DIRECT algorithm in the LM-D algorithm consumes more search time, which is the computational cost paid to seek the global optimum. It can be observed that the LM-D algorithm converges to the global optimum in all three data sets. This is the reason for the difference in convergence speed observed in data 1, 2, and 3. The outcomes derived from the analysis of the three sets of data suggest that the LM-D algorithm possesses distinct advantages, demonstrating robust global convergence and enhanced computational efficiency in comparison to other algorithms.
5.3. Verify the Accuracy of the Calibration Results
To validate the accuracy of TCP calibration results, an ABB robot repositioning method can be employed as a validation technique to assess the calibrated TCP parameters. It’s important to note that while this method provides a means of validation, it may not offer highly precise results. Alternatively, TCP calibration can be conducted using a dedicated TCP calibration tool, and the resultant TCP parameters can be compared with the calculated TCP parameters to validate the calibration accuracy. This approach often provides a more accurate and reliable validation of the TCP calibration results.
In this experiment, a LEONI standard 6D TCP calibration system was utilized to calibrate the measuring head, as depicted in
Figure 11. The LM-D algorithm addresses the contact-based TCP calibration problem, where the calibration result identifies the center of the ruby probe. The LEONI 6D TCP calibration system, on the other hand, is a non-contact calibration method based on vertical laser beam sensors. As shown in
Figure 11, this calibration method measures the bottom of the tool. The difference between the two calibration results lies in the distance between the bottom of the ruby probe and its center, which is the radius 2.5 mm of the ruby probe. The TCP calibration results obtained through the tool center point calibration method exhibited a difference of 2.5 mm in the direction of the tool axis when compared to the TCP results obtained using the standard ball calibration method.
Upon applying the transformation, the results obtained from the tool center point calibration of the measuring head were (X: 583.667, Y: −5.818, Z: 123.815), allowing for a direct comparison with the previously mentioned results. Notably, the data collected in the first set of measurements are the most extensive, and theoretically, the results (X: 583.56, Y: −6.07, Z: 123.75) obtained through the least squares method are considered more accurate. The close alignment between the two sets of data signifies that the TCP data obtained using the LM-D method is accurate, affirming the suitability of this combined algorithm for TCP calibration.
5.4. Calibration Accuracy Verification Test
The calibration accuracy verification test, as shown in
Figure 12, involves placing the ruby probe at the center of the feature hole of the workpiece calibrated by the vision system. Using the robot’s Search L instruction, the robot performs a linear motion along the programmed path. The robot stops when the probe touches the sidewall of the circular hole, and the probe immediately records the current coordinate data from the robot controller at the moment of contact.
Afterward, the robot returns to the center of the hole and proceeds to the next measurement in the programmed direction. After completing at least three measurements, the positions of the three points on the feature hole are obtained: Point 1 (x1, y1), Point 2 (x2, y2), and Point 3 (x3, y3). Once the measurement of a feature hole is completed using the search program, the three-point method is used to determine the center of the circle based on the three measured points. The precise coordinates of the circle’s center are calculated, completing the calibration of the feature hole.
The radius of the circular hole on the workpiece is 10 mm. The measured radius obtained through calculation are as follows: Circle 1: 10.1159 mm, Circle 2: 10.1848 mm, and Circle 3 10.1042 mm. The absolute measurement error is within 0.2 mm. The primary sources of measurement error include the robot’s intrinsic absolute positioning error and the signal delay when the robot stops upon receiving a signal. The ABB robot used in this experiment underwent absolute accuracy calibration, ensuring that the robot’s absolute positioning accuracy is controlled within 0.2 mm. As a result, the precision of workpiece calibration using the contact probe reached the limit of the robot’s calibration accuracy. This method effectively achieved the desired calibration outcome.
5.5. Measurement System Uncertainty Analysis
- (1)
Vision Positioning Measurement Uncertainty
The uncertainty in visual positioning is composed of both the camera calibration uncertainty and the hand-eye calibration uncertainty.
Camera Calibration Uncertainty:
The camera calibration uncertainty can be calculated as follows: the pixel error of the camera is
= ±0.02 mm; average measurement error of circular points on the calibration board is
= ±0.03 mm; the re-projection error obtained from calibrating the camera using 20 sets of checkerboard calibration patterns is 0.12 pixels, which translates to
= 0.1198 mm based on focal length and pixel size. The combined uncertainty from the camera calibration process can be expressed as
Hand-eye calibration uncertainty:
In the hand-eye calibration model, the error of the hand-eye calibration algorithm for determining X can be represented by the deviation between each calculated Xi and the true X. This deviation is expressed as the distance between the origins of the i camera coordinate systems under the same robot end-effector coordinate frame. The maximum deviation observed is 0.5235 mm, while the minimum deviation is 0.0062 mm. Therefore, the uncertainty of the hand-eye calibration algorithm is taken as
= 0.5235 mm. Additionally, the robot end-effector repeatability error is
= 0.025 mm. Combining these factors, the calibration uncertainty of the X can be determined.
- (2)
Contact Calibration Uncertainty
In the contact probe calibration model, the error in determining the TCP (Tool Center Point) is represented by the average residual value after the convergence of the LM-D algorithm. This is calculated as the average of the accumulated values obtained by substituting the convergence results into the objective function. The maximum residual value from the experimental data is used as the reference, resulting in a calibration algorithm uncertainty of = 0.0838 mm.
The contact probe calibration relies on the robot’s absolute accuracy. After absolute accuracy calibration, the absolute positioning error of the robot end effector is
= 0.1 mm, and the intrinsic error of the contact probe itself is
= 0.001 mm. Combining these factors, the calibration uncertainty of the contact probe can be determined.
In summary, the calibration uncertainty of the visual measurement system is 0.5388 mm, while the calibration uncertainty of the contact measurement system is 0.1305 mm. The uncertainty of the visual measurement system is greater than that of the contact probe. Therefore, the combined calibration method proposed in this paper plays an important role in improving the positioning accuracy of parts.
6. Discussion
Currently, in the field of robotic machining, there are many methods for measuring workpieces, which can be mainly divided into contact and non-contact methods. Contact measurement has lower costs and, in some cases, higher measurement accuracy. However, it also has significant drawbacks, primarily low efficiency, as it is a single-point measurement method and typically used independently. On the other hand, non-contact methods, such as vision and laser solutions, have relatively higher costs. If higher accuracy is required, the cost will increase regardless of whether vision or laser measurement is used. Therefore, the combined calibration method designed in this study shows potential for application in machining scenarios with high precision requirements.
In this experiment, the ABB IRB 6660 robot was used. However, this combined calibration method is not limited to a single type of robot and is applicable to nearly all industrial robots. For instance, in the practical application described in
Section 2, we used a KUKA KR 210 robot. During the debugging process, the combined calibration method achieved higher accuracy compared to using vision-based calibration alone, successfully maintaining the final workpiece machining accuracy within 0.5 mm.
The LM-D algorithm for TCP calibration within this method has also been implemented. The application of this method involves two main steps:
- 1.
Data Acquisition for Calibration: A contact-based calibration program was developed and embedded into the robot controller. When calibration is required, the program is invoked, and the robot’s pose parameters obtained during the process are saved as a txt file.
- 2.
Solution Process: The data are extracted to an upper computer, where the LM-D algorithm is executed to obtain the TCP calibration data. The calibration data is then input into the robot controller to complete the TCP calibration process.
The primary workload in software programming lies in developing the robot calibration program. Other adjustments are relatively minor and have little impact on the overall system.
Then, we believe that there are more advanced hybrid optimization algorithms yet to be explored, making it necessary to conduct broader research on hybrid optimization methods. According to the NFL theorem, the advantages of different hybrid optimization algorithms vary. Each one has its specific strengths. However, most hybrid optimization algorithms incorporate stochastic optimization methods, which introduce uncertainty into the results. In our TCP calibration, achieving the global optimum is crucial, which places higher demands on some heuristic optimization algorithms. Some hybrid optimization algorithms are computationally complex and require adjustments for specific optimization problems, which can also involve significant effort.
7. Conclusions
This paper addresses the need for robot machining of large structural components and proposes a rapid workpiece positioning method for robot machining systems. Considering the specific characteristics of the calibration of the measuring head, the LM-D algorithm was designed for solving it, striking a balance between computational efficiency and result accuracy. Ultimately, this method accurately calibrates the parameters of the probe TCP, ensuring precise workpiece coordinate system calibration, and providing a foundation for high-precision robot machining of workpieces. It has significant implications for achieving high-precision robot machining of workpieces. The following conclusions are achieved:
Firstly, a robotic machining system with milling and polishing capabilities was designed. For structural components with arbitrary positioning, a combined calibration approach was developed, which combines the ease of visual measurement-based positioning with the precision of contact-based measurement positioning. This approach involves the use of low-cost 3D vision products for initial rough positioning of the workpiece coordinate system. After determining the approximate coordinate system of the workpiece, a rapid positioning method using robot-held contact probes is then employed for precise positioning.
Secondly, a robot sphere-to-sphere contact calibration model was established, and a system of nonlinear equations for calibrating the robot’s contact-based measuring probe was formulated. The research focused on numerical iterative methods for solving this nonlinear equation system. It was concluded that the robot’s contact calibration model requires high global convergence and exhibits non-convex and discontinuous characteristics, allowing the establishment of convergence criteria. This provides a theoretical foundation for designing a more suitable method to solve the robot’s contact-based calibration model.
Thirdly, considering the practical characteristics of measuring head TCP calibration, a combined optimization algorithm, the LM-D algorithm, based on the L-M and DIRECT algorithms, was designed. This algorithm demonstrates excellent global convergence and computational efficiency. In comparison to the other algorithms, the LM-D algorithm combined optimization approach does not rely on initial values, possesses global optimization capabilities, and offers fast iteration speeds, making it effective for solving this type of nonlinear equation system problem.
Fourthly, relevant robot calibration experiments were conducted, and experimental data were obtained. After employing various optimization methods to process multiple sets of experimental data and comparing the results, it is evident that the LM-D algorithm, as opposed to other algorithms, exhibits faster computational efficiency, superior global convergence, and robustness in solving TCP problems. The LM-D algorithm proposed in this paper is not limited to measuring head TCP calibration; it can also be attempted for use in similar problems. It has the potential for further expanding its application scope.
The accuracy of TCP calibration is greatly influenced by the precision of the robot itself, including factors such as robot deformation under load, joint backlash, and absolute accuracy errors. All of these can reduce the accuracy of contact-based measurements. This is a significant limitation on the precision of contact-based calibration. To further enhance the accuracy of contact-based calibration, it is essential to implement a well-considered combined calibration method and optimize the algorithm for solving the workpiece coordinate system. This will be explored in further research.