Target tracking robot TCP automatic calibration control method

By improving the Gray Wolf Optimization Algorithm to optimize the PID controller, the problem of insufficient response speed when the complex welding path and TCP position changes greatly is solved, and the precise control of the position of the robot welding gun is achieved, which improves the accuracy and quality of welding.

CN119863510APending Publication Date: 2025-04-22BEIJING CHUANGXIANG ZHIKONG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411939933.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

In welding tasks where complex welding paths and TCP tip positions vary greatly, the response speed of traditional PID control may be insufficient, resulting in decreased welding quality or welding defects.

Method used

By improving the Gray Wolf Optimization Algorithm (IGWO), the PID controller is optimized, and the dual camera system is used to detect the deviation value of the welding wire tip and TCP, and the precise control of the position of the robot's welding gun is achieved through the IGWO-PID control method.

Benefits of technology

It improves the accuracy, quality and efficiency of welding, enhances the response speed and stability of the system, and avoids the occurrence of welding defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119863510A_ABST
    Figure CN119863510A_ABST
Patent Text Reader

Abstract

The invention discloses a target tracking robot TCP automatic calibration control method, and belongs to the technical field of PID control optimization. A position type PID controller is optimized through an improved grey wolf optimization algorithm (IGWO), the deviation between a welding wire tip and a tool center point (TCP) is detected according to a double-camera system, the deviation is converted into a millimeter value from a pixel value, deviation values (delta x, delta y and delta z) are defined and represent position deviation values of the TCP and the welding wire tip on a three-dimensional coordinate, and the position deviation values of the TCP and the welding wire tip on the three-dimensional coordinate are calculated. The PID controller is used for converting the deviation value into the three-dimensional position adjustment amount of the robot, automatic alignment of the position of a welding gun of the robot is achieved, and therefore the welding precision, quality and efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of PID control optimization, and in particular relates to a target tracking robot TCP automatic calibration control method. Background Art

[0002] In the field of industrial automation, especially in welding applications, robot welding gun position control is a key element in automated welding technology, which directly affects the accuracy, quality and efficiency of welding. In order to improve the accuracy of automated welding, high-precision TCP calibration and robot welding gun control are essential.

[0003] Traditionally, TCP calibration relies on manual adjustment, which makes it difficult to achieve ideal accuracy and consistency. In order to improve welding accuracy, modern welding systems have gradually introduced technologies such as visual inspection. Two cameras are installed at a 90° angle to detect the deviation between the TCP tip and the welding wire tip. Given a known distance between the camera and the TCP tip, the deviation between the TCP tip and the welding wire tip is converted from pixel values ​​to mm values, or a fuzzy tracking method is used to control the robot so that the robot's welding wire tip is aligned with the TCP tip; 3-10 welding gun positions are pre-stored, the alignment process is repeated 3-10 times, the deviation value between the aligned point and the TCP is recorded, the deviation value is input into a PID controller, and the optimal control of the robot's welding gun position is achieved through the PID controller.

[0004] In order to achieve the optimal control of the robot welding gun position, the PID control method is widely used. PID control reduces system errors through proportional, integral and differential adjustments to achieve stable welding gun position adjustment. However, when faced with complex welding paths and welding tasks with large changes in the position of the TCP tip, the effect of PID control will be limited, especially in scenarios where high-speed welding or the welding gun needs frequent position adjustments. The response speed of PID control may be insufficient, resulting in reduced welding quality or welding defects.

[0005] The Gray Wolf Optimizer (GWO) algorithm is an optimization algorithm based on swarm intelligence. It was proposed in 2014 and is inspired by the social hierarchy and hunting behavior of gray wolves. GWO is a global optimization algorithm suitable for continuous and nonlinear problems, and has shown good performance in solving complex optimization problems. Although the GWO algorithm has shown strong performance in many optimization tasks, it still has some defects. For example, when solving complex problems, GWO converges slowly, and it is difficult to effectively jump out of the local optimal solution in the middle and late stages of the algorithm. Summary of the invention

[0006] The purpose of the present invention is to: in view of the shortcomings of the prior art, the present invention proposes a target tracking robot TCP automatic calibration control method, optimizes the PID controller by improving the gray wolf optimization algorithm (IGWO), detects the deviation value between the tip of the welding wire and the tool center point (TCP) according to the dual camera system, and converts it from a pixel value to a millimeter value, defines the deviation value as (Δx, Δy, Δz), which represents the position deviation value between the TCP and the tip of the welding wire in three-dimensional coordinates, and the PID controller is used to convert the deviation value into the position adjustment amount of the robot, realizes the automatic alignment of the robot welding gun position, thereby improving the accuracy, quality and efficiency of welding.

[0007] In order to achieve the above object, the present invention adopts the following technical scheme: a target tracking robot TCP automatic calibration control method, including: an improved gray wolf optimization algorithm (IGWO) and a position-type PID control algorithm, the specific steps are:

[0008] Step 1: determine the optimization target of the robot welding gun position control, and establish a mathematical model of the robot welding gun position control system, wherein the mathematical model includes an objective function model and a robot welding gun position control model.

[0009] Step 2: Introduce adaptive weight improvement parameter A and random mutation strategy to improve the gray wolf optimization algorithm. The improvements are as follows:

[0010] S21, introducing adaptive weights to improve the convergence factor A;

[0011] S22. Introduce random mutation strategy to improve the mathematical model of the gray wolf optimization algorithm in the development stage.

[0012] Step 3: Automatically optimize the parameters of the PID controller through the IGWO algorithm. During the global iteration process, the algorithm simulates the social hierarchy and hunting behavior of gray wolves, searches for the optimal PID control parameter combination in the parameter space, and decodes each value of the optimal PID control parameter combination into Kp, Ki, and Kd parameters to obtain the optimal PID control method, namely the IGWO-PID control method.

[0013] Step 4: Locally adjust the position of the robot welding gun by the IGWO-PID control method, and input the position deviation value (Δx, Δy, Δz) between the TCP and the tip of the welding wire in the three-dimensional coordinates in real time feedback into the IGWO-PID controller, and realize precise control of the welding gun position by adjusting the control quantity u(t). Furthermore, in the mathematical model, the objective function, as the basis of the IGWO optimization algorithm, requires the minimum overshoot and response time of the robot welding gun position adjustment, comprehensively considering the overshoot, response time, stabilization time and other indicators of PID control, and selects the objective function model as follows:

[0014]

[0015] In formula (9), J is the fitness value calculated by the objective function, e(t) is the error value at time t, and T is the total operation time of the control system.

[0016] Furthermore, in step 1, a robot welding gun position control model is established for the robot welding gun position control system to ensure smoothness of welding gun position adjustment and avoid sharp changes so as to improve the accuracy and stability of automated welding.

[0017] Furthermore, the position deviation between the given TCP and the wire tip in the three-dimensional coordinates can be expressed as:

[0018]

[0019] In formula (10), x TCP ,y TCP 、z TCP , is the actual three-dimensional coordinate value of the welding wire tip, x Tagert ,y Tagert 、z Tagert is the three-dimensional space coordinate value of the TCP tip;

[0020] Furthermore, in the control system model, a position PID controller is used to convert the deviation value into the position and angle adjustment of the robot. The basic formula of the position PID control is as follows:

[0021]

[0022] In formula (11), U(t) is the control quantity output by the PID controller at time t, e(t) is the position deviation value at time t, Kp is the proportional parameter, Ki is the integral parameter, Kd is the differential parameter, and the other parameters have the same meanings as above.

[0023] Furthermore, PID control is applied to the three directions of x, y, and z respectively, and the PID control output in each direction is:

[0024]

[0025] In formula (12), Ux(t), Uy(t), and Uz(t) are the control outputs in the x, y, and z directions, respectively; Kpx, Kix, and Kdx are the PID gains in the x direction; Kpy, Kiy, and Kdy are the PID gains in the x direction; Kpz, Kiz, and Kdz are the PID gains in the x direction; and the other parameters have the same meanings as above.

[0026] Furthermore, the step 2, introducing the adaptive weight improvement parameter A and the random mutation strategy to improve the gray wolf optimization algorithm, specifically comprises the following steps:

[0027] S1. Introduce adaptive weight to improve the convergence factor A. The improved mathematical model of A is:

[0028]

[0029] In formula (1), the exponential term λ is the adaptive weight, which controls the overall amplitude of A to gradually decrease with iteration. sin(2π×it) makes the value of A oscillate regularly during the exploration phase through periodic fluctuations, thus avoiding falling into the local optimum. is a random unit vector with a value between [0, 2], r1 is a random number with a value between [0, 1], it is the current iteration number, and MT is the maximum iteration number of the algorithm;

[0030] S2. Introduce random mutation strategy to improve the mathematical model of the gray wolf optimization algorithm in the development stage. The improved mathematical model is:

[0031]

[0032] X i (it+1)=X i (it)+γ·r s ·(X max (it)-X min (it)) (5);

[0033] In formula (2), Describes the distance between the ω wolf and the α, β, δ individuals in the group, is the swing factor between distances, X α , X β , X δ are the individual positions of α, β, and δ;

[0034] In formula (3), X1, X2, and X3 represent the positions of individual ω after the position update under the guidance of individuals α, β, and δ, and A1, A2, and A3 are the convergence factors between the distances;

[0035] In formula (4), X i (it+1) is the updated position of the i-th individual, X i (it) is the position of the i-th individual in the current iteration, and the other parameters are the same as above;

[0036] In formula (5), X i (it+1) is the updated individual position, X i (it) is the individual position in the current iteration, X max (it) the worst individual in the population, X min (it) is the best individual in the population, r sis a random number between [-1, 1], γ is the variation intensity coefficient, which is 0.01 and is used to control the amplitude of variation, and it is the current number of iterations.

[0037] Furthermore, in step 3, the parameters of the PID controller are automatically optimized by the IGWO algorithm. During the global iteration process, the algorithm searches for the optimal PID control parameter combination in the parameter space by simulating the social hierarchy and hunting behavior of gray wolves, and decodes each value of the optimal PID control parameter combination into Kp, Ki, and Kd parameters to obtain the optimal PID control method, namely the IGWO-PID control method. The specific steps are as follows:

[0038] S31. Initialize the improved grey wolf optimization algorithm (IGWO), initialize the population size N, the maximum number of iterations MT, the problem dimension Dim, and the algorithm search space [Ub, Lb] of the improved grey wolf optimization algorithm, where Ub and Lb are unit vectors of dimension Dim;

[0039] S32, initializing the individual positions of the improved fishing optimization algorithm, generating the initial positions of the individuals in the population, and the mathematical model of the initial individual positions is:

[0040] X i =(Ub-Lb)×r2+Lb (6);

[0041] In formula (6), X i is the individual initial position randomly generated by the pseudo-random number method, r2 is a random unit vector with a value between [0, 1], and Ub and Lb have the same meaning as above;

[0042] S33, check whether the positions of all individuals are out of bounds, calculate their fitness, select the individual with the largest fitness as the worst individual, and the individual with the smallest fitness as the best individual;

[0043] S34. Define the social hierarchy of wolves, select the three best solutions in the population as α, β and δ, and the remaining solutions are ω individuals. The wolf pack hierarchy is used to guide the entire search process;

[0044] S35, the algorithm enters the exploration phase, simulating the behavior of wolves surrounding prey to establish a mathematical model. The mathematical model of the exploration phase is:

[0045]

[0046] In formula (7), X p (it) represents the target prey position, X i (it) is the individual position of the current iteration, is the swing factor, with a value between [0, 2]. is the distance between the gray wolf and its prey;

[0047] Furthermore, in formula (8), X i (it+1) is the updated individual position, the mathematical model of A is the same as above, and the meanings of other parameters are the same as above;

[0048] S36, the algorithm enters the development stage, simulating the behavior of wolves attacking prey to establish a mathematical model, and the improved mathematical model of the development stage is the same as above;

[0049] S37, after each round of iteration, update the values ​​of parameters A and C, and update the level of the wolf pack (α, β, δ) at the same time, until the maximum number of iterations is reached or the convergence condition is met;

[0050] S38. Check whether the current number of iterations it is greater than the maximum number of iterations MT. If so, output the optimal PID control parameter combination of the improved Grey Wolf Optimization Algorithm, and decode the various values ​​of the optimal PID control parameter combination into Kp, Ki, and Kd parameters. If not, execute it=it+1 and return to step S3 to continue the algorithm iteration optimization.

[0051] The present invention proposes a target tracking robot TCP automatic calibration control method, which has the following beneficial effects:

[0052] 1. By introducing the adaptive weight improvement parameter A, the gray wolf can achieve a balance between extensive exploration in the early stage and fine development in the later stage, which helps to jump out of the local optimum in the complex search space and quickly converge to the global optimum;

[0053] 2. Introduce random mutation strategy to improve the mathematical model of the gray wolf optimization algorithm in the development stage. Random mutation can help the gray wolf jump out of the local optimal solution, thereby enhancing the global search ability of the algorithm;

[0054] 3. The PID controller is optimized by using the improved Grey Wolf Optimization algorithm (IWGO). According to the real-time feedback of the position deviation between the TCP and the wire tip in the three-dimensional coordinates, the deviation e(t) is calculated and input into the IGWO-PID controller. By adjusting the control quantity u(t), the position of the welding gun can be precisely controlled, thereby improving the accuracy and quality of automatic welding of the robot welding gun. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 Diagram of optimization steps for robot welding gun position PID controller.

[0056] Figure 2 Optimize the PID controller flow chart for improving the Grey Wolf optimization algorithm.

[0057] Figure 3 Optimize the Kp, Ki, and Kd parameter curves of the PID controller to improve the Grey Wolf optimization algorithm.

[0058] Figure 4 Comparison chart of the fitness value curves of the PID controller optimized by the improved grey wolf optimization algorithm and the ordinary grey wolf optimization algorithm.

[0059] Figure 5 Comparison chart of the effects of optimizing PID controller using improved grey wolf optimization algorithm and ordinary grey wolf optimization algorithm. DETAILED DESCRIPTION

[0060] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0061] The present invention provides a target tracking robot TCP automatic calibration control method, including: an improved gray wolf optimization algorithm (IGWO) and a position PID control algorithm, such as Figure 1 As shown, the specific steps are:

[0062] Step 1: determine the optimization target of the robot welding gun position control, and establish a mathematical model of the robot welding gun position control system, wherein the mathematical model includes an objective function model and a robot welding gun position control model.

[0063] Furthermore, in the mathematical model, the objective function, as the basis of the IGWO optimization algorithm, requires the minimum overshoot and response time of the robot welding gun position adjustment. Considering the overshoot, response time, and stabilization time of PID control, the objective function model is selected as:

[0064]

[0065] In formula (9), J is the fitness value calculated by the objective function, e(t) is the error value at time t, and T is the total operation time of the control system.

[0066] Furthermore, in step 1, a robot welding gun position control model is established for the robot welding gun position control system to ensure smoothness of welding gun position adjustment and avoid sharp changes so as to improve the accuracy and stability of automated welding.

[0067] Furthermore, the position deviation between the given TCP and the wire tip in the three-dimensional coordinates can be expressed as:

[0068]

[0069] In formula (10), x TCP ,y TCP 、z TCP, is the actual three-dimensional coordinate value of the welding wire tip, x Tagert ,y Tagert , Z Tagert is the three-dimensional space coordinate value of the TCP tip;

[0070] Furthermore, in the control system model, a position PID controller is used to convert the deviation value into the position and angle adjustment of the robot. The basic formula of the position PID control is as follows:

[0071]

[0072] In formula (11), U(t) is the control quantity output by the PID controller at time t, e(t) is the position deviation value at time t, Kp is the proportional parameter, Ki is the integral parameter, Kd is the differential parameter, and the other parameters have the same meanings as above.

[0073] Furthermore, PID control is applied to the three directions of x, y, and z respectively, and the PID control output in each direction is:

[0074]

[0075] In formula (12), Ux(t), Uy(t), and Uz(t) are the control outputs in the x, y, and z directions, respectively; Kpx, Kix, and Kdx are the PID gains in the x direction; Kpy, Kiy, and Kdy are the PID gains in the x direction; Kpz, Kiz, and Kdz are the PID gains in the x direction; and the other parameters have the same meanings as above.

[0076] Step 2: Introduce adaptive parameter β, disturbance factor δ and leader guidance strategy to improve the fishing optimization algorithm.

[0077] Furthermore, the step 2, introducing the adaptive weight improvement parameter A and the random mutation strategy to improve the gray wolf optimization algorithm, specifically comprises the following steps:

[0078] S1. Introduce adaptive weight to improve the convergence factor A. The improved mathematical model of A is:

[0079]

[0080] In formula (1), the exponential term λ is the adaptive weight, which controls the overall amplitude of A to gradually decrease with iteration. sin(2π×it) makes the value of A oscillate regularly during the exploration phase through periodic fluctuations, thus avoiding falling into the local optimum. is a random unit vector with a value between [0, 2], r1 is a random number with a value between [0, 1], it is the current iteration number, and MT is the maximum iteration number of the algorithm;

[0081] S2. Introduce random mutation strategy to improve the mathematical model of the gray wolf optimization algorithm in the development stage. The improved mathematical model is:

[0082]

[0083] X i (it+1)=X i (it)+γ·r s ·(X max (it)-X min (it)) (5);

[0084] In formula (2), Describes the distance between the ω wolf and the α, β, δ individuals in the group, is the swing factor between distances, X α , X β , X δ are the individual positions of α, β, and δ;

[0085] In formula (3), X1, X2, and X3 represent the positions of individual ω after the position update under the guidance of individuals α, β, and δ, and A1, A2, and A3 are the convergence factors between the distances;

[0086] In formula (4), X i (it+1) is the updated position of the i-th individual, X i (it) is the position of the i-th individual in the current iteration, i = 1...N, N is the number of algorithm populations, and other parameters are the same as above;

[0087] In formula (5), X i (it+1) is the updated individual position, X i (it) is the individual position in the current iteration, X max (it) the worst individual in the population, X min (it) is the best individual in the population, r s is a random number between [-1, 1], γ is the variation intensity coefficient, which is 0.01 and is used to control the amplitude of variation, and it is the current number of iterations.

[0088] Step 3: Automatically optimize the parameters of the PID controller through the ICFOA algorithm. During the global iteration process, the algorithm simulates various human behaviors in the fishing process, searches for the individual optimal solution of the improved fishing optimization algorithm in the algorithm's search space, and decodes the values ​​of each latitude of the individual optimal solution into Kp, Ki, and Kd parameters to obtain the optimal temperature PID control method, namely the ICFOA-PID control method. The specific steps are as follows:

[0089] S31. Initialize the improved grey wolf optimization algorithm (IGWO), initialize the population size N, the maximum number of iterations MT, the problem dimension Dim, and the algorithm search space [Ub, Lb] of the improved grey wolf optimization algorithm, where Ub and Lb are unit vectors of dimension Dim;

[0090] S32, initializing the individual positions of the improved fishing optimization algorithm, generating the initial positions of the individuals in the population, and the mathematical model of the initial individual positions is:

[0091] X i =(Ub-Lb)×r2+Lb (6);

[0092] In formula (6), X i is the individual initial position randomly generated by the pseudo-random number method, r2 is a random unit vector with a value between [0, 1], and Ub and Lb have the same meaning as above;

[0093] S33, check whether the positions of all individuals are out of bounds, and calculate their fitness, select the individual with the largest fitness as the worst individual, and the individual with the smallest fitness as the best individual;

[0094] S34. Define the social hierarchy of wolves, select the three best solutions in the population as α, β and δ, and the remaining solutions are ω individuals. The wolf pack hierarchy is used to guide the entire search process;

[0095] S35, the algorithm enters the exploration phase, simulating the behavior of wolves surrounding prey to establish a mathematical model. The mathematical model of the exploration phase is:

[0096]

[0097]

[0098] In formula (7), X p (it) represents the target prey position, X i (it) is the individual position of the current iteration, is the swing factor, with a value between [0, 2]. is the distance between the gray wolf and its prey;

[0099] Furthermore, in formula (8), X i (it+1) is the updated individual position, the mathematical model of A is the same as above, and the meanings of other parameters are the same as above;

[0100] S36, the algorithm enters the development stage, simulating the behavior of wolves attacking prey to establish a mathematical model, and the improved mathematical model of the development stage is the same as above;

[0101] S37, after each round of iteration, update the values ​​of parameters A and C, and update the level of the wolf pack (α, β, δ) at the same time, until the maximum number of iterations is reached or the convergence condition is met;

[0102] S38. Check whether the current number of iterations it is greater than the maximum number of iterations MT. If so, output the optimal PID control parameter combination of the improved Grey Wolf Optimization Algorithm, and decode the various values ​​of the optimal PID control parameter combination into Kp, Ki, and Kd parameters. If not, execute it=it+1 and return to step S3 to continue the algorithm iteration optimization.

[0103] Step 4: Locally adjust the position of the robot welding gun through the IGWO-PID control method. According to the real-time feedback of the position deviation value between the TCP and the welding wire tip in the three-dimensional coordinates, it is input into the IGWO-PID controller, and the precise control of the welding gun position is achieved by adjusting the control quantity u(t). The specific steps are as follows:

[0104] S41. Use Siumulink simulation software to establish a simulation model for the position PID controller, convert the robot welding gun position control optimization problem into a mathematical problem to be solved, set the temperature PID controller simulation model running time to 50s, the sampling time to 0.5s, the initial distance to 0mm, and the target distance to 1mm;

[0105] S42. Use Matlab mathematical software to establish a mathematical model of the improved gray wolf optimization algorithm, initialize the population size N of the improved gray wolf optimization algorithm to 30, the maximum number of iterations MT to 20, the algorithm search space dimension Dim to 3, and the upper and lower bounds Ub of the algorithm space to 100 and Lb to 0;

[0106] S43. Use Siumulink simulation software to establish a simulation model for the objective function, write a connection function, and connect the position PID controller with the improved gray wolf optimization algorithm mathematical model;

[0107] S44, running the improved Grey Wolf optimization algorithm mathematical model, the algorithm iteratively seeks the best, outputs the PID control parameter combination found in each iteration, and decodes each value in the combination into Kp, Ki, and Kd parameters;

[0108] S45, outputting the Kp, Ki, and Kd parameters to the position PID controller through a connection function, and operating the position PID controller;

[0109] S46, according to the position deviation value of the TCP and the welding wire tip in the three-dimensional coordinates fed back in real time, input the deviation value into the IGWO-PID controller;

[0110] S47, IGWO optimized PID controller outputs the corresponding control quantity. The system adjusts the robot welding gun position appropriately according to the current output control quantity to achieve precise control of the welding gun position.

[0111] S48, the objective function model calculates the fitness of the individual solution, and transmits the fitness back to the improved gray wolf optimization algorithm mathematical model, and the algorithm continues to iterate to determine whether the iteration is terminated;

[0112] S49, if the iteration is terminated, the optimal PID control parameter combination of the improved gray wolf optimization algorithm is output, and each value of the optimal PID control parameter combination is decoded into Kp, Ki, and Kd parameters, such as Figure 3 As shown, the optimal Kp, Ki, and Kd parameters are: 7.105, 0.318, and 5.093.

[0113] like Figure 4 As shown in the figure, the fitness value curves of the PID controller optimized by the improved gray wolf optimization algorithm and the ordinary gray wolf optimization algorithm are compared and analyzed. It can be seen that in the first few iterations, the fitness values ​​of the ordinary gray wolf optimization algorithm and the improved gray wolf optimization algorithm both drop rapidly, but the rate of decline of the improved algorithm is significantly faster. The fitness value is close to 120 at the beginning, but after several iterations, the improved algorithm quickly approaches a lower fitness value. As the number of iterations increases, the fitness value of the ordinary algorithm decreases slowly and gradually stabilizes, while the improved algorithm still maintains a faster downward trend and quickly approaches a lower fitness value. The improved algorithm is significantly better than the ordinary algorithm in terms of convergence speed. In the later stage of iteration, the fitness value of the improved golden ant optimization algorithm has approached convergence and reached a relatively stable state, with the best fitness value of 6.632. The fitness value of the ordinary algorithm converges at a higher level, with the best fitness value of 9.634. This shows that the improved algorithm can find a better solution and avoid local optimality. It can be concluded that when optimizing the control parameters of the position PID controller in the robot welding gun position control system, the optimization performance of the improved gray wolf optimization algorithm is stronger than that of the ordinary gray wolf optimization algorithm.

[0114] like Figure 5As shown in the figure, the response curves of the PID controller optimized by the improved gray wolf optimization algorithm and the ordinary gray wolf optimization algorithm are compared and analyzed from the aspects of response speed, overshoot and dynamic stabilization time. It can be seen that when the simulation time is close to 5 seconds, the response speed rises rapidly, and the response curves of the two algorithms quickly reach the target value (1mm). This shows that in terms of response speed, both can reach the target response quickly, and the response speed of the improved algorithm and the ordinary algorithm is not much different. The overshoot of the ordinary gray wolf optimization algorithm is slightly higher than that of the improved gray wolf optimization algorithm, and its curve has a greater fluctuation after reaching the target value. The overshoot of the improved algorithm is smaller, and the curve is closer to the target value, indicating that the oscillation amplitude of the improved algorithm after reaching the response target is smaller and closer to the ideal response. After the simulation time is about 15 seconds, the responses of the two algorithms tend to be stable and no longer produce significant fluctuations. However, the response curve of the improved algorithm has already approached the target value and remained stable after about 10 seconds, while the curve of the ordinary algorithm takes a longer time to stabilize. This shows that the dynamic stabilization time of the improved algorithm is shorter and the stable state can be reached faster. This shows that the performance of the improved Gray Wolf optimization algorithm in optimizing the PID controller is very powerful. It is effective to optimize the control parameters of the position PID controller in the robot welding gun position control system by using the improved Gray Wolf optimization algorithm.

[0115] In summary, the present invention provides a target tracking robot TCP automatic calibration control method, which optimizes the position PID controller in the robot welding gun position control system through the improved grey wolf optimization algorithm (IGWO), so that the system can respond more quickly and accurately in a complex dynamic environment, and reach a stable state more quickly, so that the system has good robustness and stability, thereby improving the accuracy, quality and efficiency of automatic welding of the robot welding gun.

Claims

1. A target tracking robot TCP automatic calibration control method, comprising: Improve the gray wolf optimization algorithm IGWO and position PID control algorithm. The specific steps are: Step 1, determining the optimization target of the robot welding gun position control, and establishing a mathematical model of the robot welding gun position control system, wherein the mathematical model includes an objective function model and a robot welding gun position control model; Step 2: Introduce adaptive weight to improve the convergence factor A and random mutation strategy to improve the gray wolf optimization algorithm; Step 3: Automatically optimize the parameters of the PID controller through the IGWO algorithm. During the global iteration process, the algorithm simulates the social hierarchy and hunting behavior of gray wolves, searches for the optimal PID control parameter combination in the parameter space, decodes each value of the optimal PID control parameter combination into Kp, Ki, and Kd parameters, and obtains the optimal PID control method, namely the IGWO-PID control method. Step 4: The position of the robot welding gun is locally adjusted through the IGWO-PID control method. The position deviation value between the TCP and the wire tip in the three-dimensional coordinates is fed back in real time and input into the IGWO-PID controller. The precise control of the welding gun position is achieved by adjusting the control quantity u(t).

2. The target tracking robot TCP automatic calibration control method according to claim 1 is characterized in that: In step 2, the adaptive weight is introduced to improve the convergence factor A. The improved mathematical model of A is: In formula (1), the exponential term λ is the adaptive weight, which controls the overall amplitude of A to gradually decrease with iteration. sin(2π×it) makes the value of A oscillate regularly during the exploration phase through periodic fluctuations, thus avoiding falling into the local optimum. is a random unit vector with a value between [0, 2], r1 is a random number with a value between [0, 1], it is the current iteration number, and MT is the maximum iteration number of the algorithm.

3. The target tracking robot TCP automatic calibration control method according to claim 1 is characterized in that: The step 2 introduces a random mutation strategy to improve the mathematical model of the gray wolf optimization algorithm in the development stage. The improved mathematical model is: X i (it+1)=X i (it)+γ·r s ·(X max (it)-X min (it)) (5); In formula (2), Describes the distance between the ω wolf and the α, β, δ individuals in the group, is the swing factor between distances, X α , X β , X δ are the individual positions of α, β, and δ; In formula (3), X1, X2, and X3 represent the positions of individual ω after the position update under the guidance of individuals α, β, and δ, and A1, A2, and A3 are the convergence factors between the distances; In formula (4), X i (it+1) is the updated position of the i-th individual, X i (it) is the position of the i-th individual in the current iteration, i = 1...N, N is the number of algorithm populations, and other parameters are the same as above; In formula (5), X i (it+1) is the updated individual position, X i (it) is the individual position in the current iteration, X max (it) the worst individual in the population, X min (it) is the best individual in the population, r s is a random number between [-1, 1], γ is the variation intensity coefficient, which is 0.01 and is used to control the amplitude of variation, and it is the current number of iterations.

4. The method for automatic calibration and control of a target tracking robot TCP according to claim 1, characterized in that: The step 3, automatically optimizing the parameters of the PID controller by using the IGWO algorithm, specifically comprises the following steps: S31. Initialize the improved grey wolf optimization algorithm (IGWO), initialize the population size N, the maximum number of iterations MT, the problem dimension Dim, and the algorithm search space [Ub, Lb] of the improved grey wolf optimization algorithm, where Ub and Lb are unit vectors of dimension Dim; S32, initializing the individual positions of the improved fishing optimization algorithm, generating the initial positions of the individuals in the population, and the mathematical model of the initial individual positions is: X i =(Ub-Lb)×r2+Lb (6); In formula (6), X i is the individual initial position randomly generated by the pseudo-random number method, r2 is a random unit vector with a value between [0, 1], and Ub and Lb have the same meaning as above; S33, check whether the positions of all individuals are out of bounds, and calculate their fitness, select the individual with the largest fitness as the worst individual, and the individual with the smallest fitness as the best individual; S34. Define the social hierarchy of wolves, select the three best solutions in the population as α, β and δ, and the remaining solutions are ω individuals. The wolf pack hierarchy is used to guide the entire search process; S35, the algorithm enters the exploration phase, simulating the behavior of wolves surrounding prey to establish a mathematical model. The mathematical model of the exploration phase is: In formula (7), X p (it) represents the target prey position, X i (it) is the individual position of the current iteration, is the swing factor, with a value between [0, 2]. is the distance between the gray wolf and its prey; In formula (8), X i (it+1) is the updated individual position, the mathematical model of A is the same as above, and the meanings of other parameters are the same as above; S36, the algorithm enters the development stage, simulating the behavior of wolves attacking prey to establish a mathematical model, and the improved mathematical model of the development stage is the same as above; S37, after each round of iteration, update the values ​​of parameters A and C, and update the level of the wolf pack (α, β, δ) at the same time, until the maximum number of iterations is reached or the convergence condition is met; S38. Check whether the current number of iterations it is greater than the maximum number of iterations MT. If so, output the optimal PID control parameter combination of the improved Grey Wolf Optimization Algorithm, and decode the various values ​​of the optimal PID control parameter combination into Kp, Ki, and Kd parameters. If not, execute it=it+1 and return to step S3 to continue the algorithm iteration optimization.