Abstract
Due to the influence of many factors such as machining and working environment, the robot kinematics model has errors, which leads to the inaccuracy of the actual position and pose. Therefore, in order to solve this problem, this paper proposes a method based on the genetic algorithm to directly modify the rotation variables of the manipulator joint to improve the positioning accuracy of the manipulator. Through the establishment of the mechanical kinematics model and the error model, the solution formula of joint correction is obtained. The actual pose of the end effector of the manipulator is detected by the NDI three-dimensional dynamic displacement measurement system, and the correction value is applied to the control of the designed 6-DOF series manipulator.
1. Introduction
With the continuous development of the social economy, the positioning control of the tandem robot arm is based on the inverse kinematics model; that is, for a given robot end effector’s spatial pose, the motors of each joint are driven to run at the angle of rotation calculated by the inverse kinematics solution to reach the specified position [1–3]. However, in the actual work, due to many factors such as machining, working environment, and so on, the robot kinematics model has errors, which lead to the inaccuracy of the actual position and pose, thus affecting the absolute positioning accuracy of the robot [4]. To solve this problem, researchers apply a variety of model-based parameter recognition methods to identify the accurate parameters of the robot model, thereby improving the absolute positioning accuracy of the robot [5].
Robust design is a tertiary design method with quality loss function and signal-to-noise ratio (SN) as tools. It seeks the optimal level combination of controllable factors by analyzing controllable factors, noise effects, and interaction effects so that the designed product (or process system) can guarantee the robustness of the quality characteristic when the design parameters are varied during the manufacture or use, or the material is aging or deteriorating (within a certain range) within the specified life, or small changes occur to use conditions and the environment. That is, it is an engineering optimization design method by which the actual value of the quality index reaches the target value as much as possible while the variance of the quality characteristic fluctuation is as small as possible [6]. At present, it can be roughly divided into two categories: one is the traditional robust design method based on empirical or semiempirical design, mainly including the Taguchi robust design method, the response curved surface method, the dual response curved surface method, and the generalized linear model method [5–7]. The other is a robust optimization design method based on engineering models combined with optimization technology, mainly including the tolerance polyhedron method, the sensitivity method, the variation transfer method, the stochastic model method, and the hybrid robust design method based on cost-quality models [8–10]. The traditional method stick on seeking a suitable design parameter during the whole process so that the quality output of the product not only has small fluctuations but also can accurately respond to the signal factor. Under normal circumstances, such a design point does not exist. Even if the theoretical result of the gray system is used, a satisfactory solution can be believed to be found. Meanwhile, the design method based on mathematical statistical analysis is not conducive to a deep understanding of the dynamic product structure. To analyze the robustness of the mechanical system, the system function must first be established. In actual engineering, the dynamic characteristic structure system is very complicated, and it is generally not easy to give a clear expression of the performance function.
The traditional Taguchi robustness design method converts the model of the quality loss function into a signal-to-noise ratio index and then determines the optimal level combination of parameter values through orthogonal experimental design, reflecting that it is necessary to know the approximate range and level of the optimal solution; otherwise, it will be solved through multiple rounds of orthogonal experiments, resulting in reduced efficiency [11–13].
Multivariable predictive compensation is relied upon in this study to propose a variable correction method based on the genetic algorithm, which reduces the position and attitude errors of the end effector of the robot arm by correcting the rotation variable of the robot arm, and aims to explore ways to improve the positioning accuracy of the robot arm and avoid the complex inverse kinematics solution, which can be applied to the real-time control of the robot arm simply and effectively [14, 15].
There are two reasons for the uncertainty in the engineering system structure. One is the statistical reason; that is, it is caused by the fluctuation of stiffness or damping, which is caused by the randomness of material properties and boundary conditions, as well as the error caused by manufacturing and assembly technology. Another nonstatistical reason is that the measurement error of the physical properties of the dynamic system components will lead to some degree of uncertainty in the mechanical properties of the system. For example, it is caused by the assumptions and approximations in the structural mathematical model. The mechanical performance of the system will produce a certain degree of uncertainty due to the measurement error of the physical properties of the dynamic system components. It is caused, for example, by assumptions and approximations in the mathematical model of the structure, where a degree of uncertainty in the mechanical properties of the system arises from the analysis of engineering structures due to measurement errors in the physical properties of dynamic system components. Structural optimisation of uncertain parameters, fuzzy structural reliability optimisation design, and nonprobabilistic structural reliability optimisation design are currently being considered. The author believes that the current mechanical system designs are mainly focused on only the impact of the uncertainty of the structure parameter itself on the system, and the impact of the uncertainty of the structure itself on the system is seldom considered. The main reason is the difficulty in expression of the uncertainty of the structure itself. An artificial small parameter ? is added into the engineering model in this article, and the relevant theory of disturbance analysis of the optimization problem is used to simply discuss a class of nonlinear constrained symmetric cone-informal optimization problems, effectively solving a class of robust design of the mechanical system with uncertainty of structure and uncertain parameters.
2. Establishment of Robust Optimal Design Model for Dynamic Mechanical Products
The design process can be regarded as the process of mapping from the functional domain to the physical domain. For the dynamic mechanical product system, the quality characteristic output can be expressed by the following functional formula:where x ∈ Rn is a controllable design variable vector, p ∈ Rm is an uncontrollable parameter vector (fixed nominal value), and t is a signal factor (set as continuous). For the convenience of derivation, the controllable design parameter x is regarded as the function of the signal factor x(t) from the perspective of math, the product quality model is abstracted as follows:
The ideal quality output model of the product can be considered as a linear model as follows:where k and b are constants.
Now consider the interference of random noise factors on the design parameters and use the Taylor second-order expansion formula of the abstract function which is as follows:
Note that the derivative here is the F derivative or G derivative of the abstract function.
Among them, δx is an n-dimensional random vector under each fixed t. The whole process δx is a random process. Noise factors interfere with the design parameters. From another perspective, it can be seen that the signal factor is subject to random interference signals, that is, the white noise sequence V(t), resulting in the following:
Among them, δt is subject to a distribution with a mean value of 0 and a variance of σ2 (it can have different weights), and δy is a random variable under fixed t, so the following equation can be obtained:
Ignoring random interactions between design parameters, the following equation is obtained:
During the product life cycle, the total fluctuation variance is as follows:
It can be abbreviated as follows:
The deviation between the quality output and the ideal quality output is recorded as f(x, p, t) (−kt + b).
It can be seen that the influence of the controllable factor level on the quality of the output response is reflected in two aspects: one is the fluctuation variance of the output response, and the other is the sensitivity deviation of the output response. The robust design of products with dynamic characteristics requires to guarantee minimizing the quality output fluctuation of the product, and then the sensitivity of the quality output reaches the ideal sensitivity through the adjustment factor. The functional optimization model for the robust design of products with dynamic characteristics is as follows:
The sensitivity index of product quality output characteristic fluctuation variance can be characterized by the Lipschitz index of functional F(x, x′, t), let F(x, x′, t) be continuous in T×X, and meet t in a certain interval [t1,t2], there is a constant L,0 < L < 1, for any x1, x2, such that F(x1, x′, t)-F(x2,x′,t)||<L||x1−x2||, then L is called the Lipschitz index of F.
The method of seeking the functional extreme value is generally the calculus of variations. Two related variational principles are given as follows:
Theorem 1. The functional extreme value with multiple independent variables.
Suppose the O plane area, z(x, y)∈C2(Ω), and meets the boundary conditions (t is the parameter of boundary Ω).
Function l, where F is a known second-order continuous partial derivative. If the functional J obtains a local extremum in the argument z(x, y), then z(x, y) must satisfy Euler’s equation, which is as follows:
Theorem 2. Functional extreme value variation principle with multiple admissible functions.
E = {y(x) × z(x)∈c2[a,b] × c2[a,b],y(x),z(x) satisfy certain constraint boundary conditions}, functional J : E⟶R, functional , where F is a function with a continuous second derivative. If the functional J takes local extremum on the arguments y(x), z(x), then y(x), z(x) must satisfy the Euler equation set, which is as follows:
The robust optimization of products with dynamic characteristics contains constraints. The stationary value solution of the restricted variational problem can be solved by the Lagrange multiplier. The original F is replaced by F + gλ, and its basic variational principle remains unchanged. Note that the abovementioned variational problem is solved by converting the problem into a differential calculus, but in fact, there are only a few cases where the finite solution of the differential equation can be obtained. In most cases, the exact solution cannot be solved from a differential equation. We can start directly from the functional itself to obtain its approximate solution. The basic idea is to use some approximate means to simplify the problem. The commonly used method is Euler’s finite idea, which is to obtain the approximate solution after replacing the smooth admissible function with a polyline approximation. According to the idea of the Ritz method of difference method, the approximate solution of the original problem is obtained from the extreme value of a subclass of the allowable function, to improve the accuracy of the approximate solution by expanding the range of the subadmissible function class. Refer to the literature for the abovementioned two optimization algorithm methods in detail. Regarding the functional extreme value variational principle with constraints, the minimum-maximum principle or the dynamic programming principle can be used.
A new optimization solution algorithm is introduced as follows:
The functional optimization problem discussed previously is simplified as follows:where O is the convex set of the linear space X and f is the real-valued function on O. G:Ω⟶Z is the mapping, Z is the normed linear space with positive convex cones, the definition collection Γ = {Z ∈ Z exists in X∈Ω, satisfying G(x) ≤ Z}, and G is a convex set in Z. Then, the so-called primitive functional is defined on Γ: (z) = inf{f(x)x∈Ω, G(x) ≤ Z}.
We introduce two other related theorems as follows:
Theorem 3. Generalized Lagrange multiplier theorem.
Suppose X is a linear space, Z is a normed linear space, O is the convex set of X, P is a positive convex cone in Z, and P contains at least one interior point, and f is a real-valued convex functional on Ω, G:Ω ⟶ Z is a convex mapping about P, and there is a point x1∈Ω, Make G(x1)<θ, that is, G(x1) ∈N, plan as follows:
Then, there is a Lagrange multiplier Z0 ≥ 0 in Z, so that u = inf{f(x)+<G(x), Z0>}.
Let L(X,Z) = {f(x) + <G(x), Z>} be the Lagrange functional, L(X,Z0) is functional of L(X, Z) in Z = Z0. In addition, if at a certain point x0∈Ω, and G(x0) ≤ θ, making the convex programming reach the infimum u0, then x0 also makes the Lagrange functional reach the infimum at Z0, and also <G(x0),Z0 ≥ 0.
Theorem 4. Lagrange duality theorem.
Let X be a linear space, O is a convex set of X, f is a real-valued convex functional G on Ω: Ω ⟶ Z is a convex mapping, if there is a point x∈Ω, making (x) < θ, and u0 = inf(f(x) G(x) ≤ θ, x∈Ω) is finite.
The functional model of the robust design with dynamic characteristics can be transformed into a finite-dimensional optimization problem in its dual space. After the dual solution is obtained, the optimal design parameters of the original functional robust optimization design can be obtained according to the collinear condition. In general, the abovementioned optimal design parameters are all piecewise continuous functions of time t, but in the actual decision-making process, the design parameters should be a scalar.
The implementation steps of the genetic algorithm are as follows, and the flowchart is shown in Figure 1:(1)For the theoretical pose of the end effector of the robot arm, according to the inverse kinematics analytical solution expression (3), the theoretical rotation joint variable θi of the robot arm is calculated.(2)The theoretical joint variable θi obtained by the inverse solution is used as the controlled variable to control the operation of the robot arm, and the NDI system is used to measure the actual end effector’s pose and calculate the error between the actual pose and the theoretical pose.(3)The rotation correction amount Δθi of the six joints of the robot arm is constituted as an individual of the genetic algorithm. Randomly generate M initial individuals to form a population, and according to the genetic algorithm, iteration is started with this population as the initial point.(4)Substitute the correction value into expression (15) to find the corrected error of each group of samples of the end effector of the robot arm. The fitness function of each individual is obtained according to expression (16). Stop computing when the fitness function is small enough.(5)When the fitness function is greater than the set value, a new generation of individuals will be generated according to the selection, crossover, and mutation operations of the genetic algorithm. Return to Step 4.(6)After multiple iterative evolutions until the iteration termination condition is met, the last-generation population obtained is the optimal modified solution.

3. Experiment and Analysis
The experiment includes robot on-site data gathering and MATLAB simulation. The experiment process is divided into three parts: (1) 305 groups of pose data are chosen in the workspace of the robotic arm as the target value, and the main controller performs the kinematic inverse solution according to the target pose value to calculate the theoretical rotation angle θi of each joint motor. Then, it is passed to each motion controller through serial communication to control the operation of each motor. Meanwhile, the identification points are fixed on the end effector, and the NDI measurement system is used to measure the end effector’s pose. The 305 target poses, actual arrival poses, and errors are recorded, respectively. (2) Using the first 300 sets of data as the samples of the genetic algorithm, calculate the compensation value of each joint rotation variable when the total error of these 300 sets of data is minimized. (3) The variable compensation value is used to correct the theoretical rotation angle of the last five sets of data. The corrected joint variables are then used to control the robotic arm, and then the NDI measurement system is used to detect the arrival pose of the end effector, and the corrected pose error is calculated.
4. The Genetic Algorithm Data Simulation
The modification of robot arm joint rotation variables is realized by programming in MATLAB software based on the genetic algorithm. The genetic algorithm parameters are set as follows: population size M = 20; variation rate Pm = 0.1; crossover rate Pc = 0.9; and termination evolution algebra G = 10000. The change of the optimal individual fitness value in the genetic algorithm optimization process is shown in Figure 2.

The modified value of each joint rotation variable obtained by genetic algorithm optimization is as follows:
Δθ = [Δθ1,Δθ2,Δθ3,Δθ4,Δθ5,Δθ6] = [0.003065153, 0.000461247, 0.0003220547, 0.0181416, 0.02526204, 0.03165852].
5. Experimental Verification and Analysis
In order to verify the effectiveness of the method, the last five sets of data are selected as experimental data. The rotation variable of each joint calculated based on the theoretical pose values of these 5 sets of data is compensated with the correction value calculated in the previous section, and the corrected rotation variable is used as the controlled variable to drive the robot arm to move and measure the actual pose reached by the end effector of the robot arm after correction. The coordinate values of the theoretical pose of the end effector and the actual measured pose before and after correction in the base coordinate system of the robot arm are shown in Table 1.
By comparing the measured value of the end effector before and after the correction with the theoretical target pose value, the positioning error before and after the correction can be obtained. The position error is evaluated by physical distance. For the attitude error matrix, the Euclidean norm is used to evaluate the attitude error of the robot arm. The position and attitude error measurements of the robot arm are as follows:
The position and attitude error data of 5 groups before and after correction are expressed in Figure 3 and 4. It can be seen that after correcting the rotation variables, the pose accuracy of the robotic arm is significantly improved. After correction, the average position error of the end effector of the front robot arm is ΔP- = 2.18, and the average attitude error is ΔR- = 0.2590; after correction, the average position error is ΔP′, = 1.27, and the average attitude error is ΔR′, = 0.1727. The position accuracy is increased by 41.74%, and the attitude accuracy is increased by 33.32%.


Experiments show that it can effectively reduce the end pose error of the robot arm caused by the DH parameter error of the robot arm to apply the joint rotation variable correction calculated by the genetic algorithm to compensate for the joint variable value calculated by the real-time control system. It is verified through experiments that only the modification of joint variables can reduce the influence of the physical parameters of the connecting rod on the pose of the end effector. It not only verifies the feasibility of the method in theoretical derivation but also verifies its effectiveness and operability through experiments. It can be seen from Figure 3 that the use of joint compensation variables has different effects on the accuracy of each group of poses. The joint compensation variables calculated by the genetic algorithm have a better effect on the pose correction of some points in some areas, while the correction effect of some points is poor. This is because when selecting the samples of the genetic algorithm in this paper, 300 points are randomly selected in the robotic arm motion space. Due to the uneven distribution of the samples and the small number of selections, the sample ergodicity of the training data is not enough. In order to improve the reliability and effectiveness of the method, the more samples are obtained, the better, but this will also increase the complexity of the experiment and lead to a significant increase in the evolutionary algebra of genetic algorithms and longer training time. In the experiment, precise measurement equipment is needed to obtain experimental data, and multiple sets of data samples need to be collected. The operation time is long, and its control parameters need to be optimized in the offline state of the robotic arm. Therefore, the experimental method needs to be carried out in a laboratory environment. The method needs to be improved in that the pose error caused by the connecting rod parameter error is related to four variables. It is possible to reduce the error by compensating one variable as much as possible, but it is difficult to completely eliminate the error. To completely eliminate the error, it is necessary to increase the number of compensating variations, which will increase the computational complexity.
6. Conclusions
In view of the circumstance where engineering robustness research is currently focused on static single-objective robust design, that is, the system output expectation is one and constant, but in real engineering practice, many mechanical product quality characteristics, namely, the system output is dynamic multiobjective, a method for compensating the rotation variable of a robot arm joint is proposed in this article to reduce the positioning error caused by inaccurate connecting rod parameters. The genetic algorithm is used to calculate the optimal joint variable correction amount, which is used to improve the positioning accuracy of any set of end data of the robot arm. The optimal correction calculated by the genetic algorithm is applied to the designed six-degree-of-freedom tandem robot arm. Experiments have verified the effectiveness of the method and the degree of accuracy improvement and have solved the problem of the difficulty of the calculation of analytic solutions of inverse kinematics caused by the robot kinematics model after the traditional calibration.
Data Availability
The data used to support the findings of this study are available from the corresponding author upon reasonable request.
Conflicts of Interest
The author declares that there are no conflicts of interest.
Acknowledgments
This research study was sponsored by the Science and Technology Planning Project of Dezhou University (no. 2017kjrc05). The paper is published for the conclusion of the project. The authors thank the project for supporting this article.