Robot joint value error compensation method and device, electronic equipment and medium

By screening high-vibration joints and using error models to predict and compensate for joint value errors, combined with lightweight online learning algorithms and hardware-level synchronization, the problem of low efficiency in robot joint error compensation is solved, enabling rapid and accurate positioning of the robot in vibration scenarios.

CN121670646APending Publication Date: 2026-03-17ZHUHAI GREE INTELLIGENT EQUIP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

In existing technologies, robot joint value error compensation is inefficient, leading to a decrease in the positioning accuracy of the end effector. Furthermore, existing methods require frequent shutdowns or have high algorithm complexity, making them difficult to operate efficiently in real-time control systems.

Method used

By acquiring the joint angles and signal energy of the robot joints, high-vibration joints are screened out. An error model is used to predict and compensate for joint value errors. Combined with a lightweight online learning algorithm and hardware-level synchronization, dynamic adaptive compensation is achieved.

Benefits of technology

It improves the efficiency of robot joint error compensation, reduces the number of model parameters, and enhances robot state stability and positioning accuracy, meeting the high-precision requirements of modern intelligent manufacturing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121670646A_ABST
    Figure CN121670646A_ABST
Patent Text Reader

Abstract

The invention provides a robot joint value error compensation method and device, electronic equipment and a medium, which can be widely applied to the technical field of computers, and the robot joint value error compensation method comprises the following steps: acquiring joint angles of a plurality of joints of a robot; determining signal energy under a preset frequency band according to the joint angle; if the signal energy is greater than preset energy, screening a first joint from a plurality of joints; the vibration quantity of the first joint is greater than that of the second joint; the joint angle corresponding to the first joint is input into an error model to predict the joint value error of the first joint, and a first joint compensation value is obtained; and a first target angle is corrected through the first joint compensation value, a first corrected angle is obtained, and the robot motion is adjusted with the first corrected angle and a second target angle as adjusting targets. According to the method, model parameters are reduced, the failure rate is quickly compensated, and the compensation efficiency of the robot is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and more specifically, to a method, apparatus, electronic device, and medium for compensating for robot joint value errors. Background Technology

[0002] Industrial robots, with their high degree of freedom and flexibility, have become core equipment in modern manufacturing. However, during long-term operation, the joint values ​​of robots accumulate errors due to factors such as manufacturing tolerances, mechanical wear, thermal deformation, load changes, and environmental temperature fluctuations, leading to a decrease in the positioning accuracy of the end effector.

[0003] In related technologies, one embodiment collects data from a robot in a stopped state using an offline calibration method to establish an error model, but this embodiment requires frequent shutdowns, affecting production efficiency; another embodiment presets a fixed compensation value in the controller, but after long-term use, the compensation accuracy decreases significantly due to increased wear; yet another embodiment combines encoders and force sensors for error detection, but the algorithm is highly complex and difficult to run efficiently in a robot real-time control system, affecting compensation efficiency and consequently the robot's positioning accuracy. Summary of the Invention

[0004] The main objective of this application is to provide a method, device, electronic device, and medium for robot joint value error compensation, so as to at least solve the problem of low efficiency in robot joint value error compensation in the prior art.

[0005] To achieve the above objectives, according to one aspect of this application, a method for compensating joint value errors in a robot is provided. The method includes: acquiring joint angles of multiple joints of the robot; determining signal energy in a preset frequency band based on the joint angles; if the signal energy is greater than a preset energy, selecting a first joint from the multiple joints; wherein the multiple joints include a second joint other than the first joint, and the vibration amount of the first joint is greater than the vibration amount of the second joint; using the joint angle corresponding to the first joint as an input error model to predict the joint value error of the first joint, obtaining a first joint compensation value; correcting a first target angle using the first joint compensation value to obtain a first corrected angle, and adjusting the robot's motion using the first corrected angle and a second target angle as adjustment targets; wherein the first target angle is the target angle of the first joint, and the second target angle is the target angle of the second joint. This application, by analyzing the joint signal energy of the robot, determines that in a vibration failure scenario, and uses an error model to compensate for joint value errors in some joints of the robot, reducing model parameters to quickly compensate for the failure rate and improve the robot's compensation efficiency.

[0006] Optionally, the step of predicting the joint value error of the first joint using the joint angle input error model corresponding to the first joint to obtain the first joint compensation value includes:

[0007] The cumulative deviation of the joint angle is determined based on the difference between the joint angle of each joint and the initial calibration angle.

[0008] The joint wear characteristics are determined by integrating the cumulative deviation of the joint angles.

[0009] The joint wear characteristics are input into the error model to correct the prediction of the joint value error, thereby obtaining the corrected first joint compensation value.

[0010] Optionally, the method further includes:

[0011] Gradient significance analysis is performed on the joint wear characteristics, and the first weights related to the joint wear characteristics are selected from the error model based on the gradient significance analysis results.

[0012] The weight update amount is determined based on the preset learning rate, the gradient of the loss function of the error model, the preset wear sensitivity coefficient, and the absolute value of the gradient.

[0013] The first weight is corrected by updating the weight, resulting in the corrected first weight and error model. The joint value error is then predicted using the corrected error model.

[0014] Optionally, the method further includes:

[0015] Obtain the end-effector positions of multiple joints of the robot;

[0016] The actual error value is determined based on the difference between the stated end position and the target end position;

[0017] Based on the difference between the first joint compensation value and the actual error value, a loss function is constructed, and the parameters of the error model are adjusted according to the loss function to obtain the trained error model. The joint value error is then predicted using the trained error model.

[0018] Optionally, the joint angle is measured by a first sensing unit, and the end-effector position is measured by a second sensing unit. The method further includes:

[0019] A hardware timestamp is embedded in the controller to unify the clocks of the first sensing unit, the second sensing unit, and the controller.

[0020] Optionally, after adjusting the robot's motion with the first correction angle and the second target angle as the adjustment targets, the method further includes:

[0021] Obtain the next end-effector positions of multiple joints of the robot; wherein the next end-effector positions are the actual positions of the robot's joint ends after adjustment by the error model;

[0022] If the positional deviation between the next end position and the next target position is greater than a preset error threshold, a third joint is selected from the plurality of joints; wherein, the plurality of joints includes a fourth joint other than the third joint, and the positional deviation corresponding to the third joint is greater than the positional deviation corresponding to the fourth joint;

[0023] The weights corresponding to the third joint in the error model are fine-tuned to update the error model, and the joint value error is predicted using the updated error model.

[0024] Optionally, before predicting the joint value error of the first joint using the joint angle input error model corresponding to the first joint to obtain the compensation value of the first joint, the method further includes:

[0025] Before making the first prediction of the joint value error, the parameters of the error model are initialized using the joint wear characteristics, so that the joint value error can be predicted for the first time using the initialized error model.

[0026] To achieve the above objectives, according to another aspect of this application, a robot joint value error compensation device is provided, comprising:

[0027] The acquisition module is used to acquire the joint angles of multiple joints of the robot;

[0028] The calculation module is used to determine the signal energy in the preset frequency band based on the joint angle.

[0029] A filtering module is used to filter a first joint from the plurality of joints if the signal energy is greater than a preset energy; wherein the plurality of joints includes a second joint other than the first joint, and the vibration amount of the first joint is greater than the vibration amount of the second joint;

[0030] The prediction module is used to predict the joint value error of the first joint by the joint angle input error model corresponding to the first joint, and obtain the compensation value of the first joint.

[0031] An adjustment module is used to correct a first target angle by the first joint compensation value to obtain a first corrected angle, and to adjust the robot motion with the first corrected angle and the second target angle as adjustment targets; wherein, the first target angle is the target angle of the first joint, and the second target angle is the target angle of the second joint.

[0032] According to another aspect of this application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-described robot joint value error compensation method through the computer program.

[0033] According to another aspect of this application, a computer-readable storage medium is provided, including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the above-described robot joint value error compensation method.

[0034] According to another aspect of this application, a computer program product is provided, including computer instructions that, when executed by a processor, implement the steps of the above-described robot joint value error compensation method.

[0035] By applying the technical solution of this application, this application determines the joint value error of some joints of the robot under vibration failure scenario by analyzing the joint signal energy of the robot and using an error model to reduce the model parameters, thereby quickly compensating for the failure rate and improving the robot's compensation efficiency. Attached Figure Description

[0036] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0037] Figure 1 A schematic diagram illustrating an application scenario of a robot joint value error compensation method provided in an embodiment of this application is shown.

[0038] Figure 2 A flowchart illustrating a robot joint value error compensation method provided in an embodiment of this application is shown.

[0039] Figure 3 A schematic diagram of the error compensation architecture provided according to an embodiment of this application is shown;

[0040] Figure 4 A schematic flowchart of another joint value error compensation process provided according to an embodiment of this application is shown;

[0041] Figure 5 A schematic flowchart of a vibration detection process provided according to an embodiment of this application is shown;

[0042] Figure 6 A schematic diagram of the structure of a robot joint value error compensation device provided according to an embodiment of this application is shown;

[0043] The above figures include the following reference numerals:

[0044] 102, Processor; 104, Memory; 106, Transmission device; 108, Input / output device; 610, Acquisition module; 620, Calculation module; 630, Filtering module; 640, Prediction module; 650, Adjustment module. Detailed Implementation

[0045] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0046] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0047] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0048] As described in the background section, in related technologies:

[0049] Six-axis industrial robots, with their high degrees of freedom and flexibility, have become core equipment in modern manufacturing. However, during long-term operation, joint values ​​(i.e., joint angles or positions) accumulate errors due to factors such as manufacturing tolerances, mechanical wear, thermal deformation, load variations, and environmental temperature fluctuations, leading to a decrease in the positioning accuracy of the end effector. Existing technologies mainly employ the following methods for error compensation:

[0050] 1. Offline calibration method: Collect joint data while the machine is stopped using a laser tracker or optical measurement system to establish an error model (such as a polynomial fitting or neural network model). However, this method requires frequent shutdowns, which affects production efficiency, and the model cannot adapt to dynamic changes.

[0051] 2. Fixed compensation method: Based on the initial calibration data, a fixed compensation value is preset in the controller. However, after long-term use, the compensation accuracy decreases significantly due to increased wear.

[0052] 3. Sensor fusion method: This method combines encoders and force sensors for error detection, but the algorithm is complex and difficult to run efficiently in robot real-time control systems.

[0053] The methods described above generally suffer from problems such as strong compensation lag, poor adaptability, and the need for manual intervention, failing to meet the requirements of modern intelligent manufacturing for high-precision and highly continuous robot operation. Therefore, there is an urgent need for a method that can learn dynamically and compensate for joint errors in real time without stopping the machine.

[0054] To address the aforementioned issues, embodiments of this application provide a robot joint value error compensation method to improve the problem of inaccurate end effector positioning caused by the accumulation of joint errors during long-term use of a six-axis industrial robot. It is applicable to scenarios in industrial automated production lines where high robot positioning accuracy is required, such as precision assembly, welding, and painting. Through multi-source sensor data fusion and a lightweight online learning algorithm, dynamic adaptive compensation is achieved in vibration failure scenarios via hardware-level synchronization and wear feature embedding.

[0055] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0056] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a robot joint value error compensation method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0057] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the robot joint value error compensation method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0058] This embodiment provides a method for compensating robot joint value errors that runs on a mobile terminal, computer terminal, or similar computing device. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0059] Figure 2 This is a flowchart illustrating a robot joint value error compensation method according to an embodiment of this application. The robot joint value error compensation method includes:

[0060] Step S100: Obtain the joint angles of multiple joints of the robot;

[0061] Step S200: Determine the signal energy in the preset frequency band based on the joint angle;

[0062] Step S300: If the signal energy is greater than a preset energy, select a first joint from the plurality of joints; wherein, the plurality of joints includes a second joint other than the first joint, and the vibration amount of the first joint is greater than the vibration amount of the second joint;

[0063] Step S400: The joint angle input error model corresponding to the first joint is used to predict the joint value error of the first joint to obtain the compensation value of the first joint.

[0064] Step S500: Correct the first target angle by the first joint compensation value to obtain the first corrected angle, and adjust the robot motion with the first corrected angle and the second target angle as the adjustment targets; wherein, the first target angle is the target angle of the first joint, and the second target angle is the target angle of the second joint.

[0065] This application first obtains the joint angles of all joints. It is understood that the joint angle of a robot refers to the position of a robot joint relative to its fixed base or other joints during movement. Joint angles are typically defined as the angles of joint rotation, used to describe the relative positions and motion states of various parts of the robot. In robot control, joint angles are a crucial parameter because they directly affect the robot's motion trajectory and posture. Typically, the robot control system calculates the target angle for each joint based on task requirements, and then controls the joints to rotate to the specified positions via motors, achieving precise robot movement. For example, for a six-axis industrial robot, the current joint angles of the six joints are obtained, and these current joint angles are input into an error model to predict joint value errors. In one embodiment, the joint angles of each joint of the robot can be obtained using an incremental encoder.

[0066] This application determines the signal energy of a joint within a preset frequency band based on the joint angle. The preset energy is the upper limit of the signal energy corresponding to vibration failure, and is a normalized threshold. The preset frequency band can be set according to actual needs. Specifically, the energy distribution of the joints is determined through a Fast Fourier Transform. If the current signal energy of the robot is greater than the preset energy, the robot is in a state of vibration failure risk and needs to be quickly adjusted. This is achieved by compensating for joint errors in the high-vibration joints (i.e., the first joint) to quickly adjust the robot's state. In this application, the first joint is selected from multiple joints; the first joint is the joint with higher vibration, and the second joint is the remaining joint with lower vibration. Specifically, the first joint can be selected through a preset vibration threshold. Joints with vibration greater than the preset vibration threshold are defined as the first joint, and joints with vibration less than or equal to the preset vibration threshold are defined as the second joint. The vibration amount in this application can be vibration amplitude or vibration frequency, etc., and is not specifically limited in this application. This application inputs the joint angle related to the first joint into the error model, corrects the first target angle of the first joint, and uses the corrected first and second target angles as the target joint angles to adjust the robot. This helps to reduce the number of parameters in the error model and improve the prediction speed of the error model. By selecting the first joint, a balance is chosen between the joint adjustment accuracy and state adjustment speed of the robot, thereby improving the state stability of the robot and improving the joint adjustment efficiency.

[0067] Optionally, the step of predicting the joint value error of the first joint using the joint angle input error model corresponding to the first joint to obtain the first joint compensation value includes:

[0068] The cumulative deviation of the joint angle is determined based on the difference between the joint angle of each joint and the initial calibration angle.

[0069] The joint wear characteristics are determined by integrating the cumulative deviation of the joint angles.

[0070] The joint wear characteristics are input into the error model to correct the prediction of the joint value error, thereby obtaining the corrected first joint compensation value.

[0071] This application improves the accuracy of the error model by inputting joint wear characteristics into the input layer of the error model to correct the model's predictions.

[0072] Optionally, the method further includes:

[0073] Gradient significance analysis is performed on the joint wear characteristics, and the first weights related to the joint wear characteristics are selected from the error model based on the gradient significance analysis results.

[0074] The weight update amount is determined based on the preset learning rate, the gradient of the loss function of the error model, the preset wear sensitivity coefficient, and the absolute value of the gradient.

[0075] The first weight is corrected by updating the weight, resulting in the corrected first weight and error model. The joint value error is then predicted using the corrected error model.

[0076] This application achieves adaptive weight update by updating the first weight related to joint wear characteristics, thereby improving the prediction accuracy of the model, improving the prediction accuracy of error compensation, and improving the state stability of the robot.

[0077] In this application, the weight update amount is determined based on a preset learning rate, the gradient of the loss function of the error model, a preset wear sensitivity coefficient, and the absolute value of the gradient, including:

[0078] The first value is determined based on the product of the preset wear sensitivity coefficient and the absolute value of the gradient;

[0079] The second value is determined based on the sum of the first value and the preset value;

[0080] The weight update amount is determined based on the product of the second value, the preset learning rate, and the gradient of the loss function.

[0081] Optionally, the method further includes:

[0082] Obtain the end-effector positions of multiple joints of the robot;

[0083] The actual error value is determined based on the difference between the stated end position and the target end position;

[0084] Based on the difference between the first joint compensation value and the actual error value, a loss function is constructed, and the parameters of the error model are adjusted according to the loss function to obtain the trained error model. The joint value error is then predicted using the trained error model.

[0085] Understandably, joint angles are typically used to describe the internal state of a robot, i.e., the relative positions of structural parts; the end effector refers to the end of the robot arm, and its position reflects the robot's external position and orientation in space. There is a mathematical kinematic relationship between the robot's joint angles and the actual position of the end effector. Errors in the joint angles (i.e., the first joint compensation value) will result in errors in the actual end effector position. Therefore, a loss function is constructed by comparing the first joint compensation value with the actual error value.

[0086] Specifically, the end effector position refers to the position of the joint end effector, which can be acquired by an image acquisition device. The actual error value is determined based on the difference between the end effector position and the corresponding target end effector position. The first joint compensation value is the joint compensation value predicted by the joint angle. This application constructs a loss function using the first joint compensation value and the actual error value, and then trains an error model to predict joint errors using the trained error model.

[0087] Optionally, the joint angle is measured by a first sensing unit, and the end-effector position is measured by a second sensing unit. The method further includes:

[0088] A hardware timestamp is embedded in the controller to unify the clocks of the first sensing unit, the second sensing unit, and the controller.

[0089] This application unifies the clocks of the first and second sensing units through hardware timestamps, thereby unifying the time of joint angles and end-effector positions. The joint angles and end-effector positions are then grouped by time to form error model data input groups. This application improves the accuracy of model data through hardware timestamps, thereby enhancing the prediction accuracy of the error model.

[0090] Optionally, after adjusting the robot's motion with the first correction angle and the second target angle as the adjustment targets, the method further includes:

[0091] Obtain the next end-effector positions of multiple joints of the robot; wherein the next end-effector positions are the actual positions of the robot's joint ends after adjustment by the error model;

[0092] If the positional deviation between the next end position and the next target position is greater than a preset error threshold, a third joint is selected from the plurality of joints; wherein, the plurality of joints includes a fourth joint other than the third joint, and the positional deviation corresponding to the third joint is greater than the positional deviation corresponding to the fourth joint;

[0093] The weights corresponding to the third joint in the error model are fine-tuned to update the error model, and the joint value error is predicted using the updated error model.

[0094] The next end position is the end position of the joint under the joint angle control modified by the error model of this application. The prediction effect of the error model is determined by comparing the next end position with the next target position corresponding to the next end position. Specifically, if the position deviation is too large, the weight of the error model corresponding to the third joint is adjusted and the error model is updated to further improve the prediction accuracy of the error model.

[0095] Optionally, before predicting the joint value error of the first joint using the joint angle input error model corresponding to the first joint to obtain the compensation value of the first joint, the method further includes:

[0096] Before making the first prediction of the joint value error, the parameters of the error model are initialized using the joint wear characteristics, so that the joint value error can be predicted for the first time using the initialized error model.

[0097] To enable those skilled in the art to better understand the technical solution of this application, the implementation process of the robot joint value error compensation method of this application will be described in detail below with reference to specific embodiments.

[0098] This application utilizes the robot's own sensors to automatically learn and compensate for errors during operation. For example... Figure 3 As shown, the system hardware configuration includes: a six-axis industrial robot body, a joint encoder (resolution 0.001°, i.e., the first sensing unit in this application), an industrial camera (resolution 1920×1080, i.e., the second sensing unit in this application), and an embedded controller (such as an ARM Cortex-A72 processor).

[0099] like Figure 4 As shown, the error compensation process is as follows:

[0100] Step S41: Install high-precision sensors (such as incremental encoders) on the robot joints.

[0101] In step S42, the robot executes a series of standard motion trajectories.

[0102] Step S43: Collect joint angle and actual end position (using external sensors such as laser trackers or vision systems).

[0103] Step S44, establish an error model: the input is the joint angle, and the output is the compensation value (i.e., the compensation value of the first joint in this application).

[0104] Step S45, Model Training: Use online learning algorithms (such as online gradient descent) to continuously update the model while the robot is running.

[0105] Step S46, Real-time compensation: In the robot control loop, apply the compensation value to the joint target value (i.e., the first target angle in this application).

[0106] Specifically, the data collection phase:

[0107] (1) Joint data: Install high-precision encoders at the robot joints to record the joint angles θi (i=1-6) in real time.

[0108] (2) End-effector pose data: The robot end effector's feature points on a standard workpiece are captured by an industrial camera, and the actual pose (i.e., end position x, y, z, α, β, γ) is calculated using image processing algorithms (such as SIFT feature matching in OpenCV).

[0109] (3) Data synchronization: The joint angle and end pose data are packaged and transmitted to the controller in 100ms intervals to form a training sample set {(θi, ei)}, where ei is the error vector of joint i (i.e., ei = actual pose - target pose, i.e., in this application, the actual error value = end position - target end position).

[0110] Online error modeling stage:

[0111] (1) Model initialization: When the robot runs for the first time, a lightweight compensation model is trained based on the initial sample set. An incremental neural network (INN) is used, with the structure of input layer (6 joint angles) → hidden layer (10 neurons) → output layer (6 compensation values ​​Δθi).

[0112] (2) Dynamic update: During robot operation, the model is automatically updated every 10 cycles (i.e., 1 second).

[0113] ① Calculate the loss function for the current sample: L = Σ(Δθi - ei)²;

[0114] ② Adjust the weights between the input layer and the hidden layer (Win) and the network weights between the hidden layer and the output layer (Wout) using the online gradient descent algorithm, updating only the parameters relevant to the current data to avoid full retraining;

[0115] ③ The model parameters are stored in the controller's memory to ensure low latency.

[0116] Real-time compensation phase:

[0117] (1) Compensation Application: In the robot motion control loop, when the controller calculates the target joint value θtarget, it first calls the compensation model to output Δθi to generate the compensated target value:

[0118] θcompensate = θtarget + Δθi; that is, in this application, the first correction angle = the first target angle + the first joint compensation value;

[0119] (2) Closed-loop verification: After compensation, the end-effector accuracy is verified through a vision system; if the error still exceeds the threshold (i.e., the preset error threshold in this application, such as ±0.05mm), the model fine-tuning mechanism is triggered, prioritizing the updating of model parameters for high-error joints. Specifically, the model fine-tuning mechanism updates the "weight parameters related to high-error joints in the incremental neural network (INN)," only updating the weights related to high-error joints (such as joints 1-3), avoiding full retraining, and reducing the model fine-tuning time from 0.42ms to 0.18ms. Specifically, it is divided into two categories: weights from the input layer to the hidden layer (Win) and weights from the hidden layer to the output layer (Wout).

[0120] This application involves the following specific implementation plan:

[0121] 1. Dynamic failure prediction mechanism based on joint vibration spectrum:

[0122] Existing visual compensation schemes suffer from feature point loss due to motion blur in high-speed robot motion / vibration environments (such as welding and spraying), resulting in a compensation failure rate of up to 37%. To address this problem, the following is the technical solution of this invention:

[0123] (1) Real-time extraction of vibration spectrum features from the joint encoder data stream: The energy distribution of the joint angle signal in the 10Hz-50Hz frequency band (i.e., the signal energy in this application, Evib=Σ|X(f)|², f∈[10,50]Hz) is calculated by FFT; where X(f) is the complex number in the frequency domain obtained by performing a discrete Fourier transform (DFT) on the joint angle signal, and its magnitude |X(f)| represents the signal energy intensity at frequency f; Evib is the sum of the energy of all frequency components in the 10Hz-50Hz frequency band, used to quantify the vibration intensity. Of course, the selection of the preset frequency band can be set according to actual needs, and this application does not impose specific limitations.

[0124] Reference Figure 5 As shown, when Evib > 0.3 (i.e., the preset energy in this application, which is the normalized threshold), it is determined to be at risk of vibration failure.

[0125] (2) Dynamically switch compensation mode.

[0126] (3) Lightweight compensation model: In vibration mode (i.e. high vibration state), only joint encoder data is used to calculate Δθi through pre-trained INN model. Only the compensation parameters of joints 1-3 are enabled (i.e. the first joint shown in this application. Joints 1-3 are selected because the vibration of the last three axes is small and the compensation contribution rate is <15%), and the number of model parameters is reduced by 60%.

[0127] Technical results: The compensation failure rate under vibration scenarios was reduced from 37% to 5%; the model calculation time was reduced from 0.42ms to 0.18ms.

[0128] 2. Hardware-level timestamp alignment technology for joint-visual data:

[0129] The existing system relies on software synchronization (such as the PTP protocol). In EtherCAT+GigE Vision dual-bus transmission, the end-to-end latency fluctuation reaches ±15ms, causing misalignment of training data for the error model. The technical solution is as follows:

[0130] (1) Hardware-triggered synchronization: A timestamp synchronization module is deployed in the controller FPGA chip (ARM Cortex-A72 integrated); the joint encoder (EtherCAT) and the vision camera (GigE Vision) share the same hardware clock source (accuracy ±0.1μs).

[0131] (2) Data packet timestamp embedding.

[0132] (3) Synchronization error control: Through FPGA hardware calibration, the end-to-end synchronization error is ≤5μs (traditional software solution: 100μs~15ms).

[0133] Technical results: 100% time alignment rate of error model training data (compared to only 78% for traditional solutions); end-effector positioning accuracy improved by 62% in vibration scenarios (actual measurement: 0.15mm improved to 0.057mm).

[0134] 3. Incremental online compensation model for joint wear:

[0135] Existing incremental neural networks (INNs) suffer from parameter drift and rapid accuracy decay during long-term operation (accuracy decreases by 40% after 200 hours). The technical solution is as follows:

[0136] (1) Wear feature embedding: Add joint wear features (i.e., the joint wear features of this application) to the input layer: wi= (θi(t)-θi(0))dt (Cumulative deviation of joint angles, used to characterize the cumulative deviation between the current joint angle and the initial joint angle). Model input: [θ1,θ2,...,θ6,w1,w2,...,w6].

[0137] (2) Adaptive weight update: Only update weights that are strongly correlated with wear characteristics (through gradient significance analysis):

[0138] Model update formula: Δw=η L (1+γ | w|), γ=0.8 (wear sensitivity coefficient, calibrated using historical data).

[0139] Where Δw is the weight update amount, and η is the learning rate (0.01). L: gradient of the loss function, γ: wear sensitivity coefficient (0.8, measured value), | w|: Absolute value of the gradient. γ is a preset value; γ=0.8 is the optimal value obtained through calibration using historical data, used to enhance the model's adaptability to wear, and remains unchanged after model deployment. Those skilled in the art can determine the specific value according to their needs.

[0140] (3) Cold start mechanism: When running for the first time, the model parameters are initialized with joint wear characteristics to avoid overfitting.

[0141] Technical results: After 1000 hours of continuous operation, the compensation accuracy stabilized at ±0.018mm (traditional INN: ±0.042mm); the model update frequency increased from 1s to 5s (reducing CPU load by 45%).

[0142] The experimental comparison data mentioned above are shown in Table 1 below:

[0143]

[0144] Table 1

[0145] In summary, the proposed method for compensating joint value errors in a six-axis industrial robot comprises four steps:

[0146] Step S51: Collect joint angle data in real time using a joint encoder and extract the vibration spectrum feature value Evib.

[0147] Step S52: When Evib>0.3, dynamically switch to pure joint encoder compensation mode, and only enable the compensation parameters of joints 1-3;

[0148] Step S53: Embed a hardware timestamp in the controller FPGA chip. By sharing the same clock source with the joint encoder and vision camera, the synchronization error between joint data and vision data is ≤5μs.

[0149] Step S54: Embed the joint wear features w into the input layer of the incremental neural network, and update the weights using the adaptive weight update formula Δw=η. L (1+γ | w|) Update model parameters. The formula for calculating the joint wear characteristic wi is: wi = (θi(t)-θi(0))dt, where θi(t) is the angle of joint i at the current time, and θi(0) is the initial calibration angle.

[0150] The comparison between this solution and the traditional solution is shown in Table 2 below:

[0151]

[0152] Table 2

[0153] This solution also achieves the following beneficial effects: Significantly improved accuracy: Through dynamic modeling, the error attenuation rate is significantly improved compared to traditional methods, meeting the needs of micron-level processing; Zero downtime operation: The compensation process is completed during robot operation, without interrupting the production process; Low cost and high compatibility: Only existing joint encoders and industrial cameras are needed (no additional laser equipment required), making it compatible with mainstream robot brands; Strong adaptability: The model automatically learns wear and temperature changes without manual intervention, extending the robot's lifespan; Scalability: The method can be transferred to five-axis or seven-axis robots, or integrated into digital twin systems.

[0154] To achieve the above objectives, according to another aspect of this application, a robot joint value error compensation device is provided, referring to... Figure 6 As shown, it includes:

[0155] The acquisition module 610 is used to acquire the joint angles of multiple joints of the robot;

[0156] The calculation module 620 is used to determine the signal energy in a preset frequency band based on the joint angle.

[0157] The filtering module 630 is used to filter a first joint from the plurality of joints if the signal energy is greater than a preset energy; wherein the plurality of joints includes a second joint other than the first joint, and the vibration amount of the first joint is greater than the vibration amount of the second joint.

[0158] The prediction module 640 is used to predict the joint value error of the first joint by the joint angle input error model corresponding to the first joint, and obtain the compensation value of the first joint.

[0159] The adjustment module 650 is used to correct the first target angle by the first joint compensation value to obtain the first corrected angle, and to adjust the robot motion with the first corrected angle and the second target angle as the adjustment targets; wherein, the first target angle is the target angle of the first joint, and the second target angle is the target angle of the second joint.

[0160] According to another aspect of this application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-described robot joint value error compensation method through the computer program.

[0161] According to another aspect of this application, a computer-readable storage medium is provided, including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the above-described robot joint value error compensation method.

[0162] According to another aspect of this application, a computer program product is provided, including computer instructions that, when executed by a processor, implement the steps of the above-described robot joint value error compensation method.

[0163] It should be noted that the above are merely illustrative examples and do not specifically limit the implementation logic.

[0164] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0165] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0166] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0167] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0168] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0169] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0170] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0171] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0172] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0173] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0174] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A robot joint value error compensation method, characterized by, The robot joint value error compensation method comprises: obtaining joint angles of multiple joints of a robot; determining signal energy in a preset frequency band according to the joint angles; if the signal energy is greater than a preset energy, screening a first joint from the multiple joints; wherein the multiple joints comprise a second joint in addition to the first joint, and a vibration amount of the first joint is greater than a vibration amount of the second joint; inputting a joint angle corresponding to the first joint into an error model to predict a joint value error of the first joint, and obtaining a first joint compensation value; correcting a first target angle by the first joint compensation value to obtain a first corrected angle, and adjusting movement of the robot with the first corrected angle and a second target angle as adjustment targets; wherein the first target angle is a target angle of the first joint, and the second target angle is a target angle of the second joint.

2. The robot joint value error compensation method according to claim 1, characterized in that, The method further comprises: determining a joint angle cumulative deviation according to a difference between the joint angle of each joint and an initial calibration angle; determining a joint wear feature according to an integral term obtained by integrating the joint angle cumulative deviation; inputting the joint wear feature into the error model to correct the prediction of the joint value error, and obtaining a corrected first joint compensation value.

3. The robot joint value error compensation method according to claim 2, characterized in that, The method further comprises: performing gradient saliency analysis on the joint wear feature, and screening a first weight related to the joint wear feature from the error model according to a gradient saliency analysis result; determining a weight update amount according to a preset learning rate, a loss function gradient of the error model, a preset wear sensitivity coefficient, and a gradient absolute value; correcting the first weight by the weight update amount to obtain a corrected first weight and an error model, and predicting the joint value error by the corrected error model.

4. The robot joint value error compensation method according to claim 1, characterized in that, The method further comprises: obtaining an end position of multiple joints of a robot; determining an actual error value according to a difference between the end position and a target end position; constructing a loss function according to a difference between the first joint compensation value and the actual error value, adjusting parameters of the error model according to the loss function, obtaining a trained error model, and predicting the joint value error by the trained error model.

5. The robot joint value error compensation method according to claim 4, characterized in that, The joint angle is measured by a first sensing unit, and the end position is measured by a second sensing unit, and the method further comprises: embedding a hardware timestamp in a controller to unify clocks of the first sensing unit, the second sensing unit, and the controller.

6. The robot joint value error compensation method of claim 1, wherein, After adjusting the movement of the robot with the first corrected angle and the second target angle as adjustment targets, the method further comprises: obtaining a next end position of multiple joints of a robot; wherein the next end position is an actual position of a joint end of the robot after adjustment by the error model. If the position deviation of the next end position and the next target position is greater than a preset error threshold, a third joint is selected from the plurality of joints; wherein the plurality of joints include a fourth joint in addition to the third joint, and the position deviation corresponding to the third joint is greater than the position deviation corresponding to the fourth joint; Fine-tune the weight corresponding to the third joint in the error model to update the error model, and predict the joint value error through the updated error model.

7. The robot joint value error compensation method according to claim 2, wherein, Before the joint angle error corresponding to the first joint is input into the error model to predict the joint value error of the first joint and obtain the first joint compensation value, the method further comprises: Before the first prediction of the joint value error, the parameters of the error model are initialized through the joint wear characteristics to perform the first prediction of the joint value error through the initialized error model.

8. A robot joint value error compensation apparatus, characterized by, The robot joint value error compensation device comprises: An acquisition module is configured to acquire joint angles of a plurality of joints of a robot; A calculation module is configured to determine signal energy in a preset frequency band according to the joint angles; A screening module is configured to select a first joint from the plurality of joints if the signal energy is greater than a preset energy; wherein the plurality of joints include a second joint in addition to the first joint, and the vibration amount of the first joint is greater than the vibration amount of the second joint; A prediction module is configured to input the joint angle corresponding to the first joint into an error model to predict the joint value error of the first joint and obtain a first joint compensation value; An adjustment module is configured to correct a first target angle through the first joint compensation value to obtain a first corrected angle, and adjust the movement of the robot with the first corrected angle and a second target angle as adjustment targets; wherein the first target angle is a target angle of the first joint, and the second target angle is a target angle of the second joint.

9. An electronic device, comprising: The electronic device comprises: A memory and a processor, the memory stores a computer program, and the processor is configured to execute the robot joint value error compensation method of any one of claims 1 to 7 through the computer program.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises a stored program, wherein the computer readable storage medium controls the device where the computer readable storage medium is located to execute the robot joint value error compensation method of any one of claims 1 to 7 when the program is running.