Mechanical arm load mass prediction and error compensation method, system and equipment and medium

By combining machine vision and fuzzy controller with a dynamic model, the load mass prediction and error compensation of the robotic arm are dynamically adjusted, solving the problem of high-precision control of the robotic arm under unknown loads and improving stability and accuracy.

CN121870756APending Publication Date: 2026-04-17GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG UNIV OF TECH
Filing Date
2026-01-22
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

When faced with unknown loads, robotic arms have difficulty accurately judging the internal cavity structure, leading to large errors in mass estimation, affecting high-precision control and stability, and easily causing excessive end torque, resulting in workpiece damage.

Method used

By acquiring the geometric parameters and estimated mass of the target object through machine vision, and combining it with a fuzzy controller, the robot arm's dynamic model and inverse dynamic expression are used to predict the load mass and compensate for errors, dynamically adjust the joint torque output, and achieve high-precision control.

Benefits of technology

It achieves high-precision control and stable operation of the robotic arm under uncertain load conditions, reduces load mass estimation errors, and ensures real-time compensation and stability of the end effector torque of the robotic arm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121870756A_ABST
    Figure CN121870756A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of mechanical arm control, in particular to a mechanical arm load mass prediction and error compensation method, system and equipment and a medium. According to the mechanical arm load mass prediction and error compensation method, a double-input fuzzy controller is constructed by taking a root-mean-square error between predicted current and actual current at the tail end of a mechanical arm as input of the fuzzy controller and combining object estimated mass provided by machine vision. Through fuzzy reasoning and defuzzification processing, the mass compensation amount is output, and dynamic correction of the load mass and real-time compensation of torque output are achieved. The method adapts to complex load structures such as an internal cavity, the problem of quality misjudgment caused by the non-corresponding relation between the appearance and the quality in a traditional method is solved, and therefore high-precision control and stable operation are still kept under the uncertain load condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robotic arm control technology, and in particular to methods, systems, equipment and media for predicting and compensating for the load mass of robotic arms. Background Technology

[0002] With the rapid arrival of an aging population and rising labor costs, robotic arms are being deployed in more application scenarios, including direct use for logistics transportation and the addition of various tools to the end effector for more complex tasks. In applications where robotic arms perform handling tasks and carry unknown tools, they often face the problem of uncertain load mass, leading to fluctuations in joint output torque and consequently affecting the accuracy and stability of control.

[0003] To address this, existing robotic arms utilize machine vision to identify the load's dimensions and surface material type, indirectly estimating its mass using density formulas, which can improve control accuracy and stability to some extent. However, this method cannot effectively determine the object's internal structure (e.g., hollow shapes), leading to significant deviations in volume estimation and consequently, a substantial increase in the error in load mass estimation, making it difficult to meet the demands of high-precision control scenarios with such load variations. Without identification and compensation, this can easily cause the robotic arm's end-effector torque to exceed limits, even damaging the workpiece, severely limiting the robotic arm's effectiveness in high-precision, high-reliability tasks. Summary of the Invention

[0004] The main objective of this invention is to provide a method, system, device, and medium for predicting and compensating the load mass of a robotic arm. This invention aims to adapt to complex load structures such as internal cavities, overcome the problem of misjudgment of mass caused by the non-correspondence between shape and mass in traditional methods, and thus maintain high-precision control and stable operation under uncertain load conditions.

[0005] To achieve the above objectives, the first aspect of this invention proposes a method for predicting and compensating for the load mass of a robotic arm, comprising the following steps: Geometric parameters and estimated mass of the target object are obtained based on machine vision, and the estimated mass is assigned to the current predicted mass. Identify the set of no-load reference parameters for the dynamic model of the robotic arm under no-load conditions; Establish the inverse dynamics expression of the robotic arm under load. The inverse dynamics expression of the robotic arm includes the load inertia parameter set calculated based on geometric parameters and the current predicted mass. The unloaded reference parameter set is combined with the load inertia parameter set to obtain the loaded reference parameter set; Based on the mapping relationship between joint torque and joint motor current, the load reference parameter set is converted into a current-level reference parameter set at the current level. Control the robotic arm to execute a pre-designed excitation trajectory with a load, and collect the motion parameters of each joint in the robotic arm and the current of the joint motors; The full-rank regression matrix under load is calculated based on the motion parameters collected during the process of the robotic arm executing the pre-designed excitation trajectory under load. Based on the full-rank regression matrix under load and the current level reference parameter set, the predicted current under load is calculated. Mass prediction is performed based on a fuzzy controller. In the initial iteration, the current residual vector and the estimated mass of the object are used as inputs to the fuzzy controller. The current residual vector is obtained by comparing the predicted current under load with the measured joint motor current under load. In subsequent iterations, the root mean square difference of the predicted current at the end of the robotic arm and the previous mass compensation amount are used as inputs to the fuzzy controller. In each iteration, the fuzzy controller calculates and outputs a mass compensation value according to the built-in fuzzy rules, adds the mass compensation value to the current predicted mass to obtain the new predicted mass, and updates the predicted current under load. The predicted quality obtained after iterative iteration is fed back to the controller for compensation.

[0006] In the above-mentioned method for predicting and compensating the load mass of a robotic arm, identifying the unloaded parameter set of the robotic arm's dynamic model under no-load conditions includes the following steps: Establish a dynamic model of the robotic arm that includes friction; The robotic arm dynamics model is linearized, and the robotic arm dynamics model is represented in linear form by the unloaded reference parameter set for the robotic arm power parameters; Control the robotic arm to execute a pre-designed excitation trajectory under no-load conditions, and collect the motion parameters of each joint in the robotic arm; Based on the motion parameters of each joint in the robotic arm collected under no-load conditions, a regression matrix of the robotic arm dynamics model is constructed. The parameters in the no-load reference parameter set were identified using the least squares method.

[0007] In the above-mentioned method for predicting and compensating the load mass of a robotic arm, the dynamic model of the robotic arm, which includes friction, is as follows: ; in, It is an n×1 unloaded joint moment vector; For joint angles of type n×1; The joint angular velocity is n×1; Let n be the joint angular acceleration; Let n be the n×n moment of inertia vector of the connecting rod; The equivalent inertia of an n×n motor-drive system is expressed on the link side. The n×n Coriolis and centrifugal torque matrices are for the corresponding link; It is an n×1 gravitational torque vector; Let n be the joint friction torque vector of 1. The expression for the friction force model for each joint i is: ; in, Let i be the frictional torque of joint i. Here is the Coulomb friction coefficient matrix. This is the viscous friction coefficient matrix. This is the offset; It is a symbolic function.

[0008] The linear expression of the robot arm's power parameters in the robot arm's dynamics model is as follows: ; in, Represents the regression matrix. This represents the complete set of dynamic parameters to be identified. ; For each link i, the complete dynamic parameters to be identified are defined as follows: ; in, Let be the dynamic parameters of link i. Let link i be about the reference coordinate axis The moment of inertia of mass, Let link i be about the reference coordinate axis The moment of inertia of mass, Let link i be about the reference coordinate axis The moment of inertia of mass, For connecting rod i The product of inertia of a plane, For connecting rod i The product of inertia of a plane, For connecting rod i The product of inertia of a plane, Let i be the mass of link i; This indicates that the center of mass of link i lies on the reference coordinate axis. The coordinates; This indicates that the center of mass of link i lies on the reference coordinate axis. coordinates This indicates that the center of mass of link i lies on the reference coordinate axis. The coordinates; The dynamic model of the robotic arm, expressed in linear form using the unloaded reference parameter set, represents the power parameters of the robotic arm as follows: ; in, This is the regression matrix of the robotic arm's dynamics model; The unloaded reference parameter set is obtained by linear transformation of the complete set of dynamic parameters to be identified.

[0009] The formula for converting the load reference parameter set into a current level reference parameter set at the current level is as follows: ; The formula for calculating the predicted current under load is as follows: ; in, This is the full-rank regression matrix under loaded conditions. This is the predicted current under load.

[0010] The above-mentioned method for predicting and compensating the load mass of a robotic arm, which uses a fuzzy controller for mass prediction, includes the following steps: Calculate the change in error between the root mean square error of the predicted current at the end of the robotic arm and the reference value; Using the error change as the first linguistic variable, the membership degree of the current precise value of the first linguistic variable to the small, medium, and large fuzzy linguistic values ​​in the first linguistic value set is calculated through the first set of triangular membership functions, forming the first membership degree vector; the small, medium, and large fuzzy linguistic values ​​in the first linguistic value set are defined in the input universe of the first linguistic variable through their respective triangular membership functions; Using the estimated mass of the object or the previous mass compensation amount as the second language variable, the membership degree of the current precise value of the second language variable to the small, medium, and large fuzzy language values ​​in the second language value set is calculated through the second set of triangular membership functions, forming the second membership degree vector; the small, medium, and large fuzzy language values ​​in the second language value set are defined in the input universe of the second language variable through their respective triangular membership functions; Using the quality compensation quantity as the output linguistic variable, based on the fuzzy rule table, fuzzy inference is performed according to the first and second membership vectors to obtain the membership functions corresponding to the light, medium, and heavy fuzzy linguistic values ​​of the output linguistic variable, and these functions are aggregated to obtain the membership functions of the output linguistic variable. The centroid method is used to perform defuzzification calculation on the membership functions of the output linguistic variable to obtain the precise value of the quality compensation quantity.

[0011] The second aspect of this invention discloses a robotic arm load mass prediction and error compensation system, applied to the robotic arm load mass prediction and error compensation method described above. The system includes: The machine vision module is used to acquire the geometric parameters and estimated mass of the target object, and to assign the estimated mass to the current predicted mass. The identification module is used to identify the current level reference parameter set of the robotic arm dynamics model under no-load conditions. The controller is used to control the robotic arm to execute a pre-designed excitation trajectory under load, and to collect the motion parameters of each joint in the robotic arm and the current of the joint motors. The calculation module is used to establish the inverse dynamic expression of the robotic arm under load based on the unloaded dynamic model of the robotic arm. This expression includes a set of load inertia parameters calculated based on geometric parameters and the current predicted mass. Based on the mapping relationship between the parameter sets under unloaded and loaded states, the current-level reference parameter set and the load inertia parameter set are combined to obtain the current-level load reference parameter set. The calculation module also calculates the full-rank regression matrix under load based on the motion parameters collected during the process of the robotic arm executing the pre-designed excitation trajectory under load, and calculates the predicted current under load based on the full-rank regression matrix under load and the current iteration of the load reference parameter set. A fuzzy controller is used for mass prediction. In the initial iteration, the current residual vector and the estimated mass of the object are used as inputs to the fuzzy controller. The current residual vector is obtained by comparing the predicted current under load with the measured joint motor current under load. In subsequent iterations, the root mean square difference of the predicted current at the end of the robotic arm and the previous mass compensation amount are used as inputs to the fuzzy controller. In each iteration, the fuzzy controller calculates the output mass compensation value according to the built-in fuzzy rules, adds the mass compensation value to the current predicted mass to obtain the new predicted mass, and updates the load inertia parameter set. The controller is also used to compensate based on the predicted quality obtained after iterative iteration.

[0012] A third aspect of the present invention discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor performs the above-described method for predicting and compensating the load mass of a robotic arm.

[0013] The fourth aspect of the present invention discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for predicting the load mass and error compensation of a robotic arm.

[0014] The technical solution provided by this invention may include the following beneficial effects: This invention uses the root mean square error between the predicted current and the actual current at the end of the robotic arm as the input to a fuzzy controller, combined with the object mass estimation provided by machine vision, to construct a dual-input fuzzy controller. Through fuzzy inference and defuzzification processing, it outputs a mass compensation amount, achieving dynamic correction of the load mass and real-time compensation of the torque output, thus facilitating high-precision control and stable operation of the robotic arm. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0016] Figure 1 This is a flowchart of the robotic arm load mass prediction and error compensation method of the present invention; Figure 2 This is a schematic diagram of the structure of a robotic arm according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of the target object in one embodiment of the present invention; Figure 4 This is a schematic diagram of test data from one embodiment of the present invention; Figure 5 This is a schematic diagram of the robotic arm load mass prediction and error compensation system of the present invention; Figure 6 This is a schematic diagram of the framework of an electronic device according to the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0018] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.

[0019] In this invention, unless otherwise explicitly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, "fixed" can mean a fixed connection, a detachable connection, or an integral part; it can mean a mechanical connection or an electrical connection; it can mean a direct connection or an indirect connection through an intermediate medium; it can mean the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0020] Furthermore, in this invention, descriptions involving "first," "second," etc., are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the word "and / or" throughout the text means including three parallel solutions; taking "A and / or B" as an example, it includes solution A, solution B, or a solution that simultaneously satisfies A and B. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.

[0021] Example 1 The following is combined with Figure 1 The present invention describes a method for predicting and compensating the load mass of a robotic arm according to an embodiment of the invention, comprising: Step S1: Obtain the geometric parameters and estimated mass of the target object based on machine vision, and assign the estimated mass to the current predicted mass. Specifically, machine vision can identify the geometric parameters and corresponding material types of a target object, calculate the volume of the geometric object from the geometric parameters, and then obtain the estimated mass of the object by combining the density of the corresponding material in the material library data configured by the machine vision.

[0022] Step S2: Identify the no-load reference parameter set of the robotic arm dynamics model under no-load conditions. Optionally, the following steps may be included: Step S21: Establish a dynamic model of the robotic arm that includes friction; the dynamic model of the robotic arm is as follows: ; in, It is an n×1 unloaded joint moment vector; For joint angles of type n×1; The joint angular velocity is n×1; Let n be the joint angular acceleration; Let n be the n×n moment of inertia vector of the connecting rod; The equivalent inertia of an n×n motor-drive system is expressed on the link side. The n×n Coriolis and centrifugal torque matrices are for the corresponding link; It is an n×1 gravitational torque vector; Let n be the joint friction torque vector of 1. The expression for the friction force model for each joint i is: ; in, Let i be the frictional torque of joint i. Here is the Coulomb friction coefficient matrix. This is the viscous friction coefficient matrix. This is the offset; It is a symbolic function; The linear expression of the robotic arm's power parameters in the robotic arm's dynamics model is as follows: ; in, Represents the regression matrix. This represents the complete set of dynamic parameters to be identified. .

[0023] The complete dynamic parameters to be identified for each link i are defined as follows: ; in, Let i be the dynamic parameters of link i. Let link i be about the reference coordinate axis The moment of inertia of mass, Let link i be about the reference coordinate axis The moment of inertia of mass, Let link i be about the reference coordinate axis The moment of inertia of mass, For connecting rod i The product of inertia of a plane, For connecting rod i The product of inertia of a plane, For connecting rod i The product of inertia of a plane, Let i be the mass of link i; This indicates that the center of mass of link i lies on the reference coordinate axis. The coordinates; This indicates that the center of mass of link i lies on the reference coordinate axis. coordinates This indicates that the center of mass of link i lies on the reference coordinate axis. The coordinates.

[0024] Since not all dynamic parameters affect the operation of the robotic arm, the set of dynamic parameters... Some inertial parameters cannot be identified and can only be obtained after the unloaded dynamic model of the robotic arm is linearized. Therefore, this embodiment performs step S22: linearizing the robotic arm dynamic model so that the robotic arm dynamic model uses the unloaded reference parameter set. The power parameters of the robotic arm are expressed in a linear form. That is, the linear representation of the robotic arm's power parameters in the above robotic arm dynamics model is rewritten using an unloaded reference parameter set. In linear form, we have: ; in, This is the regression matrix of the robotic arm's dynamics model; The unloaded reference parameter set consists of a complete set of dynamic parameters to be identified. It is obtained through linear transformation.

[0025] Step S22: Control the robotic arm to run the pre-designed excitation trajectory in the no-load state, and synchronously collect the motor current of each joint and the joint motion parameters, including the joint angle, angular velocity and angular acceleration; Step S23: Construct the regression matrix of the robotic arm dynamics model using the collected joint angles, angular velocities, and angular accelerations. ; Step S24: Identify the no-load reference parameter set using ordinary least squares method, then: ; in, The analytical solution for the identified parameters is: ; This is the output torque of the regression model.

[0026] Step S3: Establish the inverse dynamics expression of the robotic arm under load. The inverse dynamics expression of the robotic arm includes the load inertia parameter set calculated based on geometric parameters and the current predicted mass. .

[0027] Specifically, the inverse dynamics expression for the robotic arm under load is: ; ; in, This refers to the joint torque data measured when the robotic arm is under load. For the loaded regression matrix, For the load reference parameter set, For the unloaded regression matrix, For the load regression matrix, For load inertia parameter set, This represents the n×1 torque residual vector generated by friction and unmodeled effects; For the load about the reference coordinate axis The moment of inertia of mass, For the load about the reference coordinate axis The moment of inertia of mass, For the load about the reference coordinate axis The moment of inertia of mass, For load around The product of inertia of a plane, For load around The product of inertia of a plane, For load around The product of inertia of a plane, The mass of the load is equivalent to the currently predicted mass; This indicates that the center of mass of the load is on the reference coordinate axis. The coordinates; This indicates that the center of mass of the load is on the reference coordinate axis. coordinates This indicates that the center of mass of the load is on the reference coordinate axis. The coordinates.

[0028] Step S4: Set the no-load reference parameters With load inertia parameter set By combining these parameters, a set of load-bearing reference parameters can be obtained. Specifically, by treating the load as a rigid body attached to the end effector of the robotic arm and aligning the coordinate system with the end effector, its parameters can be incorporated into the parameters of the nth link. The following formula is used to obtain the inertial parameters of the nth link (including the load): ; ; ; in, This represents the mass of the nth link when it is under load. This represents the mass of the nth link when unloaded. Indicates the quality of the load, compared to the current predicted quality. equivalence. Let n be the product of inertia of the nth link under load. Let the coordinates of the centroid of the nth link be... Let the coordinates be the centroid coordinates of the load. Let n be the mass moment of the nth link under load. Let be the product of inertia of the nth link when unloaded. Let be the product of inertia of the load. Since the loads installed at the end effector of the robotic arm may vary, the identified dynamic parameters may differ. Therefore, the control objective of the proposed algorithm can be defined by the mathematical relationship between the inertial parameters of the load and the inertial parameters of the nth link.

[0029] For example Figure 2 Taking the six-axis industrial robotic arm as an example, the load parameters are linearly superimposed on the parameters of the sixth link (i.e., the end effector of the robotic arm). These updated parameters... , , It will replace the original no-load parameter set The part corresponding to the 6th link in the middle forms the load reference parameter set for the current iteration. That is, the load inertia parameter set is mapped linearly. Add to no-load parameters A new set of load-bearing reference parameters is formed based on the corresponding parameters of the 6th link. That is, the load reference parameter set It refers to the overall dynamic parameters assuming the load is the current estimated value.

[0030] Step S5: Based on the mapping relationship between joint torque and joint motor current, the load reference parameter set is... Current level reference parameter set converted to current level .

[0031] Specifically, by substituting the linear mapping relationship between joint torque and joint motor current into the robotic arm dynamics model, a linear combination formula for the joint motor current is obtained. The linear mapping relationship between joint torque and joint motor current is as follows: ; For joint torque, This is the drive gain matrix of the joint motor, specifically a constant diagonal matrix; This refers to the joint motor current.

[0032] Substituting this into the robotic arm's dynamics model, the linear combination formula for the joint motor currents is: ; Rewriting the linear combination formula of the joint motor current as a linear expression using the current level reference parameter set, we have: ; in, For a full-rank regression matrix, For current level reference parameter set, .

[0033] Step S6: Control the robotic arm to execute the pre-designed excitation trajectory with a load, and collect the motion parameters of each joint in the robotic arm and the joint motor current. The motion parameters of the joints include joint angle, angular velocity, and angular acceleration.

[0034] Specifically, the excitation trajectory is designed based on finite Fourier series, i.e., the angle-time function of each joint is: ; in, Let be a function of the change in angle of the i-th joint over time t. As the initial angle, , For the excitation trajectory coefficient, For frequency, Let k be the harmonic order of the Fourier series, where k = 1, 2, 3, 4, 5.

[0035] The excitation trajectory is designed using the condition number of the regression matrix as the optimization objective, while limiting the angles, angular velocities, and angular accelerations of each joint to within specified ranges. These ranges are determined based on the joint motors of the robotic arm and the limiting angles. Therefore: ; For the loaded regression matrix, This is a conditional function.

[0036] Step S7: Calculate the full-rank regression matrix under load based on the joint angles, angular velocities, and angular accelerations collected during the robotic arm's execution of the pre-designed excitation trajectory under load. And based on the full-rank regression matrix under the loading state and current level reference parameter set Calculate the predicted current under load conditions; specifically, the predicted current under load conditions. = .

[0037] Among them, the full-rank regression matrix under the loading state is determined. Then, the reference parameter set of the current level was analyzed using the ordinary least squares method. If we identify it, then: ; in, The analytical solution for the parameters identified by the current level reference parameter set is: ; This is the output current vector of the regression model; The joint motor current measured under load.

[0038] The formula for calculating the current residual is: ; in, This represents the current residual.

[0039] Step S8: Perform quality prediction based on a fuzzy controller. In the initial iteration, the current residual vector and the estimated object quality are used as inputs to the fuzzy controller. The current residual vector is obtained by comparing the predicted current under load with the measured joint motor current under load. In subsequent iterations, the root mean square difference of the predicted current at the robotic arm's end effector and the previous quality compensation amount are used as inputs to the fuzzy controller. In each iteration, the fuzzy controller calculates and outputs a quality compensation value according to built-in fuzzy rules, adding the quality compensation value to the current predicted quality to obtain the new predicted quality. The iteration cycle ends when convergence occurs or the preset number of iterations is reached.

[0040] Among them, the dynamic parameters of the robotic arm's end effector are most strongly correlated with the load parameters; therefore, the root mean square error of the predicted current at the robotic arm's end effector is used as the input to the fuzzy controller. Figure 2 Taking the six-axis industrial robotic arm shown as an example, the formula for calculating the root mean square error of the predicted current at the end of the robotic arm is as follows: ; in, denoted as the root mean square error of the predicted current at the end effector of the robotic arm; For the end effector of the robotic arm j The joint motor current measured under load. For the end effector of the robotic arm j Predicted current under load conditions n This represents the total number of data samples. j For the first data sample j Data points.

[0041] Specifically, quality prediction based on a fuzzy controller includes the following steps: Step S71: Calculate the change in error between the current residual vector or the root mean square error of the predicted current at the end of the robotic arm and the reference value. In the initial iteration, calculate the change in error between the current residual vector and the reference value. In subsequent iterations, calculate the change in error between the root mean square error of the predicted current at the end of the robotic arm and the reference value.

[0042] With error change As the first linguistic variable, the membership degree of the current precise value of the first linguistic variable to the three fuzzy linguistic values ​​of Less, Middle, and Large in the first linguistic value set is calculated using the first set of triangular membership functions, forming the first membership degree vector; the three fuzzy linguistic values ​​of Less, Middle, and Large in the first linguistic value set are in the input universe of the first linguistic variable […]. , Defined by their respective triangle membership functions; Use the estimated mass of the object or the previous mass compensation amount as the second linguistic variable . At the initial iteration, use the estimated mass of the object as the second linguistic variable ; in subsequent iterations, use the previous mass compensation amount as the second linguistic variable . Calculate the current precise value of the second linguistic variable for the three fuzzy linguistic values of Less, Middle, and Large in the second linguistic value set through the second set of triangular membership functions, forming the second membership degree vector; the three fuzzy linguistic values of Less, Middle, and Large in the second linguistic value set are defined by their respective triangular membership functions in the input domain , of the second linguistic variable Use the mass compensation amount as the output linguistic variable, and based on the fuzzy rule table, perform fuzzy inference according to the first membership degree vector and the second membership degree vector to obtain the membership functions corresponding to the three fuzzy linguistic values of Light, Medium, and Heavy of the output linguistic variable, and aggregate to obtain the membership function of the output linguistic variable; the value range of the mass compensation amount is , , and use the centroid method to perform defuzzification calculation on the membership function of the output linguistic variable to obtain the precise value of the mass compensation amount .

[0043] The defuzzification calculation formula is: ; is the membership function of the output linguistic variable; is the variable value represented by the abscissa of the fuzzy output membership function<00​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​If it is "large", then it is "medium"; If it is "medium" and it is "small", then it is "medium"; If it is "medium" and it is "medium", then it is "medium"; If it is "medium" and it is "large", then it is "medium"; If it is "large" and it is "small", then it is "heavy"; If it is "large" and it is "medium", then it is "heavy"; If it is "large" and it is "large", then it is "light"; After obtaining the mass compensation amount in each iteration, update the predicted mass , and the updated predicted mass is the sum of the current predicted mass and the mass compensation amount . In the next iteration, dynamically adjust the load parameter set with the updated predicted mass , update the total load regression matrix using the joint data at the current moment, and predict a new predicted current. Then calculate the root mean square difference of the predicted current at the end of the robotic arm as the input of the fuzzy controller.

[0046] Step S9: Feed back the predicted mass obtained after cyclic iteration to the controller for compensation. It is used to adjust the joint torque output in real time to achieve compensation for load changes and ensure stable operation. [[ID=6))

[0047] Furthermore, Figure 4 shows Figure 2 a schematic diagram of partial test data changes of the robotic arm in the embodiment when taking Figure 3 a test load (4KG). Among them, Figure 4 (a) shows a schematic diagram of the value of the predicted mass changing with time; Figure 4 (b) shows a schematic diagram of the value of the root mean square difference of the predicted current at the end of the robotic arm changing with time, where the range between the two dashed lines represents the set value range; Figure 4(c) shows a schematic diagram illustrating how the value of the mass compensation quantity changes over time; Figure 4 (d) shows a schematic diagram illustrating how the value of the error change varies over time. It is evident that the prediction quality... Convergence occurred in 0.572s, with a predicted mass of 4.5174 kg. In the early stages of the test, due to limited data and noise in real-time measurements, the root mean square error of the predicted current at the robotic arm's end effector was low. Relatively high. As testing progressed, the accumulation of data enabled the fuzzy controller to predict and adjust the payload mass of the robot's end effector, thus keeping it within a predefined range. The correlation error (RE) of the final prediction result was within the error range (15%).

[0048] Example 2 This invention also provides a robotic arm load mass prediction and error compensation system 500, applied to the robotic arm load mass prediction and error compensation method in Embodiment 1. The system includes: The machine vision module 501 is used to acquire the geometric parameters and estimated mass of the target object, and to assign the estimated mass to the current predicted mass. Identification module 502 is used to identify the set of no-load reference parameters of the robotic arm dynamics model under no-load conditions. ; The controller 503 is used to control the robotic arm to execute a pre-designed excitation trajectory under load, and to collect motion parameters of each joint in the robotic arm and the current of the joint motors. The calculation module 504 is used to establish the inverse dynamics expression of the robotic arm under load. The inverse dynamics expression of the robotic arm includes a load inertia parameter set calculated based on geometric parameters and the current predicted mass. The unloaded reference parameter set and the load inertia parameter set are combined to obtain the loaded reference parameter set. Based on the mapping relationship between joint torque and joint motor current, the loaded reference parameter set is converted into a current level reference parameter set at the current level. The calculation module 504 also calculates the full-rank regression matrix under load based on the motion parameters collected during the process of the robotic arm executing the pre-designed excitation trajectory under load, and calculates the predicted current under load based on the full-rank regression matrix under load and the current iteration of the load reference parameter set. A fuzzy controller 505 is used for mass prediction. In the initial iteration, the current residual vector and the estimated mass of the object are used as inputs to the fuzzy controller. The current residual vector is obtained by comparing the predicted current under load with the measured joint motor current under load. In subsequent iterations, the root mean square difference of the predicted current at the end of the robotic arm and the previous mass compensation amount are used as inputs to the fuzzy controller. In each iteration, the fuzzy controller calculates and outputs a mass compensation value according to the built-in fuzzy rules, adds the mass compensation value to the current predicted mass to obtain the new predicted mass, and updates the predicted current under load. The controller 503 is also used to compensate based on the predicted quality obtained after iterative iteration. It is used to adjust the joint torque output in real time to compensate for load changes and ensure stable operation.

[0049] Example 3 This embodiment provides an electronic device 600, including a processor 601 and a memory 602 connected together, such as via a bus 603. Further, the electronic device 600 may also include a transceiver 604. It should be noted that in practical applications, the transceiver 604 is not limited to one, and the structure of the electronic device 600 does not constitute a limitation on the embodiments of this application. The processor 601 is used in this embodiment to implement a method for predicting the load quality and compensating for errors in a robotic arm. The processor 601 can be a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor 601 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. The bus 603 may include a path for transmitting information between the above components. The bus 603 can be a PCI bus or an EISA bus, etc. The bus 603 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6The bus is represented by a single thick line, but this does not imply that there is only one bus or one type of bus. The memory 602 can be a ROM or other type of static storage device capable of storing static information and instructions, RAM or other type of dynamic storage device capable of storing information and instructions, or it can be an EEPROM, CD-ROM or other optical disc storage, optical disk storage (including compressed optical disks, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. The memory 602 is used to store application code that executes the scheme of this application, and its execution is controlled by the processor 601. The processor 601 is used to execute the application code stored in the memory 602 to implement the steps of the robotic arm load mass prediction and error compensation method provided by this invention.

[0050] Example 4 This invention provides a storage medium storing a computer program, which is executed by a processor as described above in the steps of the robotic arm load mass prediction and error compensation method executed by the server.

[0051] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. All equivalent structural transformations made under the concept of the present invention using the contents of the present invention specification and drawings, or direct / indirect applications in other related technical fields, are included within the patent protection scope of the present invention.

Claims

1. A method for robot payload mass prediction and error compensation, characterized in that, Includes the following steps: Geometric parameters and estimated mass of the target object are obtained based on machine vision, and the estimated mass is assigned to the current predicted mass. Identify the set of no-load reference parameters for the dynamic model of the robotic arm under no-load conditions; Establish the inverse dynamics expression of the robotic arm under load. The inverse dynamics expression of the robotic arm includes the load inertia parameter set calculated based on geometric parameters and the current predicted mass. The unloaded reference parameter set is combined with the load inertia parameter set to obtain the loaded reference parameter set; Based on the mapping relationship between joint torque and joint motor current, the load reference parameter set is converted into a current-level reference parameter set at the current level. Control the robotic arm to execute a pre-designed excitation trajectory with a load, and collect the motion parameters of each joint in the robotic arm and the current of the joint motors; The full-rank regression matrix under load is calculated based on the motion parameters collected during the process of the robotic arm executing the pre-designed excitation trajectory under load. Based on the full-rank regression matrix under load and the current level reference parameter set, the predicted current under load is calculated. Mass prediction is performed based on a fuzzy controller. In the initial iteration, the current residual vector and the estimated mass of the object are used as inputs to the fuzzy controller. The current residual vector is obtained by comparing the predicted current under load with the measured joint motor current under load. In subsequent iterations, the root mean square difference of the predicted current at the end of the robotic arm and the previous mass compensation amount are used as inputs to the fuzzy controller. In each iteration, the fuzzy controller calculates and outputs a mass compensation value according to the built-in fuzzy rules, adds the mass compensation value to the current predicted mass to obtain the new predicted mass, and updates the predicted current under load. The predicted quality obtained after iterative iteration is fed back to the controller for compensation.

2. The method of claim 1, wherein, Identifying the unloaded parameter set of the robotic arm's dynamic model under no-load conditions includes the following steps: Establish a dynamic model of the robotic arm that includes friction; The robotic arm dynamics model is linearized, and the robotic arm dynamics model is represented in linear form by the unloaded reference parameter set for the robotic arm power parameters; Control the robotic arm to execute a pre-designed excitation trajectory under no-load conditions, and collect the motion parameters of each joint in the robotic arm; Based on the motion parameters of each joint in the robotic arm collected under no-load conditions, a regression matrix of the robotic arm dynamics model is constructed. The parameters in the no-load reference parameter set were identified using the least squares method.

3. The method of claim 2, wherein, The dynamic model of the robotic arm that includes friction is as follows: ; in, It is an n×1 unloaded joint moment vector; For joint angles of type n×1; The joint angular velocity is n×1; Let n be the joint angular acceleration; Let n be the n×n moment of inertia vector of the connecting rod; The equivalent inertia of an n×n motor-drive system is expressed on the link side. The n×n Coriolis and centrifugal torque matrices are for the corresponding link; It is an n×1 gravitational torque vector; Let n be the joint friction torque vector of 1. The expression for the friction force model for each joint i is: ; in, Let i be the frictional torque of joint i. Here is the Coulomb friction coefficient matrix. This is the viscous friction coefficient matrix. This is the offset; It is a symbolic function.

4. The method for predicting and compensating the load mass of a robotic arm according to claim 3, characterized in that: The linear expression of the robot arm's power parameters in the robot arm's dynamics model is as follows: ; in, Represents the regression matrix. This represents the complete set of dynamic parameters to be identified. ; For each link i, the complete dynamic parameters to be identified are defined as follows: ; in, Let be the dynamic parameters of link i. Let link i be about the reference coordinate axis The moment of inertia of mass, Let link i be about the reference coordinate axis The moment of inertia of mass, Let link i be about the reference coordinate axis The moment of inertia of mass, For connecting rod i The product of inertia of a plane, For connecting rod i The product of inertia of a plane, For connecting rod i The product of inertia of a plane, Let i be the mass of link i; This indicates that the center of mass of link i lies on the reference coordinate axis. The coordinates; This indicates that the center of mass of link i lies on the reference coordinate axis. coordinates This indicates that the center of mass of link i lies on the reference coordinate axis. The coordinates; The dynamic model of the robotic arm, expressed in linear form using the unloaded reference parameter set, represents the power parameters of the robotic arm as follows: ; in, This is the regression matrix of the robotic arm's dynamics model; The unloaded reference parameter set is obtained by linear transformation of the complete set of dynamic parameters to be identified.

5. The method for predicting and compensating the load mass of a robotic arm according to claim 4, characterized in that: The inverse dynamics expression of the robotic arm under load is: ; ; in, This refers to the joint torque data measured when the robotic arm is under load. For the loaded regression matrix, For the load reference parameter set, For the unloaded regression matrix, For the load regression matrix, For load inertia parameter set, This represents the n×1 torque residual vector generated by friction and unmodeled effects; For the load about the reference coordinate axis The moment of inertia of mass, For the load about the reference coordinate axis The moment of inertia of mass, For the load about the reference coordinate axis The moment of inertia of mass, For load around The product of inertia of a plane, For load around The product of inertia of a plane, For load around The product of inertia of a plane, The mass of the load is equivalent to the currently predicted mass; This indicates that the center of mass of the load is on the reference coordinate axis. The coordinates; This indicates that the center of mass of the load is on the reference coordinate axis. coordinates This indicates that the center of mass of the load is on the reference coordinate axis. The coordinates.

6. The method for predicting and compensating the load mass of a robotic arm according to claim 5, characterized in that: The formula for converting the load reference parameter set into a current level reference parameter set at the current level is as follows: ; in, For current level reference parameter set, This is the drive gain matrix for the joint motor; The formula for calculating the predicted current under load is as follows: ; in, This is the full-rank regression matrix under loaded conditions. This is the predicted current under load.

7. The method for predicting and compensating the load mass of a robotic arm according to claim 1, characterized in that: Quality prediction based on a fuzzy controller includes the following steps: Calculate the change in error between the root mean square error of the predicted current at the end of the robotic arm and the reference value; Using the error change as the first linguistic variable, the membership degree of the current precise value of the first linguistic variable to the small, medium, and large fuzzy linguistic values ​​in the first linguistic value set is calculated through the first set of triangular membership functions, forming the first membership degree vector; the small, medium, and large fuzzy linguistic values ​​in the first linguistic value set are defined in the input universe of the first linguistic variable through their respective triangular membership functions; Using the estimated mass of the object or the previous mass compensation amount as the second language variable, the membership degree of the current precise value of the second language variable to the small, medium, and large fuzzy language values ​​in the second language value set is calculated through the second set of triangular membership functions, forming the second membership degree vector; the small, medium, and large fuzzy language values ​​in the second language value set are defined in the input universe of the second language variable through their respective triangular membership functions; Using the quality compensation quantity as the output linguistic variable, based on the fuzzy rule table, fuzzy inference is performed according to the first and second membership vectors to obtain the membership functions corresponding to the light, medium, and heavy fuzzy linguistic values ​​of the output linguistic variable, and these functions are aggregated to obtain the membership functions of the output linguistic variable. The centroid method is used to perform defuzzification calculation on the membership functions of the output linguistic variable to obtain the precise value of the quality compensation quantity.

8. A robotic arm load mass prediction and error compensation system, characterized in that, The system, applied to the robotic arm load mass prediction and error compensation method as described in any one of claims 1-7, comprises: The machine vision module is used to acquire the geometric parameters and estimated mass of the target object, and to assign the estimated mass to the current predicted mass. The identification module is used to identify the set of no-load reference parameters for the robotic arm's dynamic model under no-load conditions. ; The controller is used to control the robotic arm to execute a pre-designed excitation trajectory under load, and to collect the motion parameters of each joint in the robotic arm and the current of the joint motors. The calculation module is used to establish the inverse dynamics expression of the robotic arm under load. The inverse dynamics expression of the robotic arm includes a set of load inertia parameters calculated based on geometric parameters and the current predicted mass. The unloaded reference parameter set and the load inertia parameter set are combined to obtain the loaded reference parameter set. Based on the mapping relationship between joint torque and joint motor current, the loaded reference parameter set is converted into a current-level reference parameter set at the current level. The calculation module also calculates the full-rank regression matrix under load based on the motion parameters collected during the process of the robotic arm executing the pre-designed excitation trajectory under load, and calculates the predicted current under load based on the full-rank regression matrix under load and the current iteration of the load reference parameter set. A fuzzy controller is used for mass prediction. In the initial iteration, the current residual vector and the estimated mass of the object are used as inputs to the fuzzy controller. The current residual vector is obtained by comparing the predicted current under load with the measured joint motor current under load. In subsequent iterations, the root mean square difference of the predicted current at the end of the robotic arm and the previous mass compensation amount are used as inputs to the fuzzy controller. In each iteration, the fuzzy controller calculates and outputs a mass compensation value according to the built-in fuzzy rules, adds the mass compensation value to the current predicted mass to obtain the new predicted mass, and updates the predicted current under load. The controller is also used to compensate based on the predicted quality obtained after iterative iteration.

9. An electronic device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.