A physical information neural network-based robot arm trajectory error compensation method

By using a physical information neural network-based method, the trajectory error of the robotic arm is predicted in real time and the joint angle correction is calculated, which solves the accuracy and stability problems of the robotic arm under load changes and environmental fluctuations, and achieves higher accuracy trajectory tracking.

CN122401407APending Publication Date: 2026-07-17WUHAN INST OF TECH +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-20
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

Existing robotic arm trajectory control methods are prone to insufficient generalization and mismatched compensation force when the load changes and the environment fluctuates, resulting in a decrease in accuracy and stability.

Method used

A method based on physical information neural networks is adopted to collect the operating status data of the robotic arm in real time, predict the trajectory error through the physical information neural network, and calculate the joint angle correction amount using an inverse kinematics solver to generate trajectory error compensation commands to drive the robotic arm to perform compensation.

Benefits of technology

It improves the accuracy and stability of the robotic arm's movement, maintains good compensation effect under parameter changes and external disturbances, reduces end-effector trajectory deviation, and achieves higher-precision trajectory tracking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122401407A_ABST
    Figure CN122401407A_ABST
Patent Text Reader

Abstract

This invention proposes a method for compensating for robotic arm trajectory errors based on a physical information neural network, relating to the field of industrial robot control technology. The method includes: collecting operational state data of the robotic arm during the execution of a given trajectory command; inputting the operational state data into a physical information neural network to output a prediction error corresponding to the end effector trajectory of the robotic arm; calculating a joint angle correction amount corresponding to the robotic arm based on the prediction error and the inverse kinematics solver of the robotic arm, and generating a trajectory error compensation command based on the joint angle correction amount; and sending the trajectory error compensation command to the controller corresponding to the robotic arm to drive the robotic arm to operate, thereby compensating for the end effector trajectory error. This application helps improve the accuracy and stability of robotic arm movement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial robot control technology, and in particular to a method for compensating for trajectory errors of a robotic arm based on a physical information neural network. Background Technology

[0002] With the rapid development of industrial automation technology, collaborative robotic arms, due to their flexible motion performance and safe human-machine collaboration capabilities, are widely used in industrial scenarios such as assembly, sorting, and precision machining. Various types of lightweight collaborative robotic arms are widely used in the market.

[0003] Chinese Patent No. CN112077839B discloses a motion control method and device for a robotic arm. The method includes: during the process of controlling n joints of the robotic arm to move along their respective given trajectories according to a preset trajectory control algorithm, if it is determined that the set error acquisition conditions are met, the motion error of each joint at the current moment is acquired, and the actual input torque of each joint at the next moment is determined. Specifically, based on the trajectory control algorithm and the motion error of each joint, the expected input torque of the joint at the next moment is calculated. Using the neural network model corresponding to the joint and the given motion state of the joint at the next moment, a compensation torque for compensating the expected input torque of the joint at the next moment is determined. The compensation torque of the joint at the next moment is used to compensate the expected input torque of the joint at the next moment to obtain the actual input torque of the joint at the next moment. Then, the movement of the robotic arm is controlled according to the actual input torque of each joint at the next moment. The compensation triggering and correction of the above scheme mainly rely on the preset trajectory control algorithm and error acquisition conditions. The compensation decision is more focused on the joint error itself. When load changes or environmental temperature and humidity fluctuations cause parameter drift, insufficient generalization and mismatched compensation strength are likely to occur, thus affecting the accuracy and stability under complex working conditions. Therefore, it is necessary to provide a robotic arm trajectory error compensation method based on physical information neural networks to improve the accuracy and stability of robotic arm movement. Summary of the Invention

[0004] In view of this, the present invention proposes a robotic arm trajectory error compensation method based on physical information neural network, which helps to improve the accuracy and stability of robotic arm movement.

[0005] The method includes: During the execution of a given trajectory command by the robotic arm, the operating status data of the robotic arm is collected; The operating status data is input into a physical information neural network so that the physical information neural network outputs a trajectory error prediction value corresponding to the end trajectory of the robotic arm. Based on the predicted trajectory error value and the inverse kinematics solver corresponding to the robotic arm, the joint angle correction amount corresponding to the robotic arm is calculated, and a trajectory error compensation command is generated based on the joint angle correction amount. The trajectory error compensation command is sent to the controller corresponding to the robotic arm to drive the robotic arm to run, so as to compensate for the end trajectory error of the robotic arm.

[0006] Based on the above technical solutions, preferably, the operating status data includes the real-time rotation angle of each joint in the robotic arm, the angular velocity of each joint, the angular acceleration data of each joint, the actual pose data of the end effector in the robotic arm, the load weight data at the interface of the end effector in the robotic arm, the ambient temperature, the ambient humidity data, and the theoretical trajectory command data of the robotic arm.

[0007] Based on the above technical solutions, preferably, the construction process of the physical information neural network includes: The physical information neural network is constructed with an input layer, a hidden layer, and an output layer, so that the physical information neural network receives the running state data and outputs the trajectory error prediction value; Physical constraint branches are constructed in parallel on the hidden layer features of the physical information neural network, so that the physical constraint branches map the hidden layer features into joint angle correction amounts; Based on the prediction error and measured error in the output layer, a data fitting loss is constructed, and based on the theoretical quantity formed by the physical constraint branch and the measured quantity corresponding to the theoretical quantity, a physical constraint loss is constructed. The data fitting loss and the physical constraint loss are weighted, and the physical information neural network is trained based on the weighted data fitting loss and the physical constraint loss.

[0008] More preferably, based on the predicted trajectory error value and the inverse kinematics solver corresponding to the robotic arm, the joint angle correction amount corresponding to the robotic arm is calculated, specifically including: Based on the trajectory error prediction value, the target end-effector pose of the robotic arm is constructed, wherein the target end-effector pose represents the compensation combination between the end-effector pose corresponding to the given trajectory command and the trajectory error prediction value; Using the target end pose as a constraint and the current joint angle as the initial value for iteration, the joint angle correction is iteratively solved by the inverse kinematics solver of the robotic arm to obtain the end pose error corresponding to the current joint angle. When the end-effector pose error is less than a preset error threshold, the iteration stops, and the inverse kinematics solver outputs the joint angle correction amount corresponding to the robotic arm.

[0009] More preferably, the method further includes: Perform a clamping operation on the joint angles obtained through iterative solving to obtain the transition joint angles; If the end pose error corresponding to the transition joint angle is greater than or equal to the preset error threshold, a transition trajectory that satisfies the joint limit condition is generated within the motion range corresponding to the target end pose. The transition trajectory and the inverse kinematics solver are then used to iterate and solve the problem again to output the joint angle correction amount.

[0010] More preferably, the step of generating trajectory error compensation instructions based on the joint angle correction amount specifically includes: The joint angle correction amount is superimposed on the joint angle command corresponding to the given trajectory command to obtain the joint target angle; The target joint angle is converted into a joint compensation control command that the robotic arm can execute. The joint compensation control command is used to drive the robotic arm to compensate for the end-effector trajectory error.

[0011] More preferably, the process of generating the trajectory error compensation instruction further includes: Based on the load weight data at the end effector interface of the robotic arm, the ambient temperature data, and the ambient humidity data, the corresponding working condition label of the robotic arm is determined; The output frequency and correction magnitude of the trajectory error compensation command are adjusted according to the working condition label. The output frequency includes increasing the output frequency under heavy load conditions and decreasing the output frequency under high temperature conditions. The correction magnitude includes smoothing the joint angle correction amount under severe motion conditions.

[0012] A second aspect of this application provides a robotic arm trajectory error compensation system based on a physical information neural network. The robotic arm trajectory error compensation system includes a data acquisition module, a data processing module, and a pose compensation module, wherein... The data acquisition module is used to collect the operating status data of the robotic arm during the execution of a given trajectory command; The data processing module is used to input the running status data into the physical information neural network, so that the physical information neural network outputs the trajectory error prediction value corresponding to the end trajectory of the robotic arm, calculates the joint angle correction amount corresponding to the robotic arm based on the trajectory error prediction value and the inverse kinematics solver corresponding to the robotic arm, and generates a trajectory error compensation command based on the joint angle correction amount. The pose compensation module is used to send the trajectory error compensation command to the controller corresponding to the robotic arm to drive the robotic arm to run, so as to compensate for the end trajectory error of the robotic arm.

[0013] A third aspect of this application provides an electronic device including a processor, a memory, a user interface, and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory.

[0014] A fourth aspect of this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the steps of a robotic arm trajectory error compensation method based on a physical information neural network.

[0015] The robotic arm trajectory error compensation method based on physical information neural network provided by this invention has the following advantages over existing technologies: (1) The trajectory error corresponding to the end trajectory is predicted by the physical information neural network, and the prediction result is mapped to the joint angle correction amount. Then the compensation command is issued, thereby effectively reducing the deviation of the end trajectory and achieving higher precision trajectory tracking. Since the error compensation does not completely rely on the accurate mathematical model, but learns the unmodeled or inaccurate parts of the system through data-driven methods, it can still maintain a good compensation effect when the robot arm parameters change, external disturbances occur, or the model has uncertainties. The running status data is collected in real time when the robot arm executes the trajectory, and the error prediction is output in real time. Then the compensation command is generated to form a closed-loop update process, which can correct the dynamic error in time and improve the control response capability. At the same time, through online prediction and continuous compensation, the trend of error gradually increasing with the execution process can be suppressed, thereby reducing the impact of long-term drift. The physical information neural network usually integrates physical laws into network training and inference, so that the network output is more consistent with the real behavior of the system. Therefore, it still has a good generalization performance when the data is limited and the scene changes, thereby improving the accuracy and stability of the robot arm movement.

[0016] (2) By first forming the joint target angle and then converting it into joint compensation control instructions that the controller can execute, the compensation logic is better compatible with the existing robotic arm control framework, the implementation difficulty is reduced, and the joint angle correction amount is directly superimposed on the joint angle instruction corresponding to the given trajectory instruction, which can be corrected without destroying the original motion intention, so that the end error compensation is more consistent and the transition is smoother at the control level. Converting the joint target angle into control instructions that the robotic arm can execute is essentially adapting the control quantity format, control mode, scale / unit, boundary constraints, etc., which can usually reduce execution jitter, saturation or error amplification problems caused by interface mismatch. Attached Figure Description

[0017] 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 these drawings without creative effort.

[0018] Figure 1 A flowchart illustrating a robotic arm trajectory error compensation method based on a physical information neural network provided by the present invention; Figure 2 This is a schematic diagram of the structure of the physical information neural network provided by the present invention; Figure 3 This is a schematic diagram of the workflow for the trajectory error compensation of the robotic arm provided by the present invention. Figure 4 This is a schematic diagram of the robotic arm trajectory error compensation system provided by the present invention; Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention.

[0019] Explanation of reference numerals in the attached figures: 1. Robotic arm trajectory error compensation system; 11. Data acquisition module; 12. Data processing module; 13. Pose compensation module; 2. Electronic equipment; 21. Processor; 22. Communication bus; 23. User interface; 24. Network interface; 25. Memory. Detailed Implementation

[0020] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. 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.

[0021] This invention discloses a method for compensating for trajectory errors of a robotic arm based on a physical information neural network, with reference to... Figure 1 The steps of this method include S1 to S4.

[0022] Step S1: During the process of the robotic arm executing the given trajectory command, collect the operating status data of the robotic arm.

[0023] The operational status data includes the real-time rotation angle of each joint in the robotic arm, the angular velocity of each joint, the angular acceleration data of each joint, the actual pose data of the end effector in the robotic arm, the load weight data at the interface of the end effector in the robotic arm, the ambient temperature and humidity data, and the theoretical trajectory command data of the robotic arm.

[0024] In this step, the robotic arm's operational status data is collected using joint attitude sensors, an end-effector pose vision detection unit, a load sensor, and an ambient temperature and humidity sensor. Joint attitude sensors are installed at each joint of the robotic arm to collect real-time rotation angle, angular velocity, and angular acceleration data. The end-effector pose vision detection unit, consisting of an industrial camera and a calibration board, is used to collect the actual pose data of the robotic arm's end effector. The load sensor is installed at the end effector interface to collect end-load weight data. The ambient temperature and humidity sensor is positioned in the robotic arm's working area to collect ambient temperature and humidity data. The collected data undergoes preprocessing, including data filtering and noise reduction, timestamp alignment, and format standardization, before being transmitted to the physical information neural network.

[0025] In one example, the joint posture sensor uses a JKA-200 high-precision encoder, installed at the six joint rotation axes of the robotic arm, with a sampling frequency of 100Hz; the end effector pose vision detection unit uses a Basler industrial camera and a Zhang Zhengyou calibration board, with the camera mounted on a gantry above the robotic arm's working area, achieving a pose detection accuracy of ±0.01mm after calibration; the load sensor uses an LCZ-203 miniature load cell with a range of 0-5kg; and the ambient temperature and humidity sensor uses an SHT30 digital sensor with a sampling frequency of 1Hz.

[0026] Step S2: Input the running status data into the physical information neural network so that the physical information neural network outputs the trajectory error prediction value corresponding to the end trajectory of the robotic arm.

[0027] In this step, the physical information neural network uses the kinematic equations and dynamic equations of the robotic arm as physical constraints to embed into the network training process. The input layer of the physical information neural network receives joint posture data, end-effector load data, environmental temperature and humidity data, and theoretical trajectory command data of the robotic arm. The hidden layer of the physical information neural network extracts features by fusing physical constraints and data-driven methods. The output layer outputs the trajectory error prediction value of the robotic arm end effector, which includes position error and posture error.

[0028] In this scheme, a 6-axis robotic arm is used, employing the standard DH parameter method. The forward kinematics equations of this robotic arm are as follows:

[0029]

[0030] in, T This represents the end effector pose of the robotic arm, and Π represents a multiplication operation. Indicates the first in the robotic arm Homogeneous transformation matrix of each joint Indicates the first in the robotic arm One joint angle, Indicates the first in the robotic arm The length of the link in each joint Indicates the first in the robotic arm The torsional angle of each joint Indicates the first in the robotic arm The link offset of each joint, the link length Linkage torsion angle and link offset All of these can be obtained directly from the technical manuals provided by the robotic arm manufacturers.

[0031] The robotic arm uses the Lagrange method, and its dynamic equations are as follows:

[0032] in, The inertia matrix is ​​represented by an initial value calculated using a CAD model, and then the parameters are identified through excitation experiments (such as joint step response). Indicates the joint angle of the robotic arm; This indicates the joint angular velocity of the robotic arm; This represents the joint angular acceleration of the robotic arm; Represents the centrifugal force matrix; The term representing gravity can be calculated from the mass of the connecting rod, the position of its center of mass, and the acceleration due to gravity. The friction term can be represented by the Stribeck model, and the coefficients of static friction, Coulomb friction, and viscous friction can be calibrated through low-speed motion experiments. This represents the joint torque, which is output by the motor and can be indirectly measured by a current sensor.

[0033] The construction process of a physical information neural network includes: Construct the input layer, hidden layer, and output layer of the physical information neural network so that the physical information neural network can receive the running status data and output the trajectory error prediction value; Physical constraint branches are constructed in parallel on the hidden layer features of the physical information neural network, so that the physical constraint branches map the hidden layer features into joint angle correction amounts. Based on the prediction error and measured error in the output layer, a data fitting loss is constructed, and based on the theoretical quantity formed by the physical constraint branch and the measured quantity corresponding to the theoretical quantity, a physical constraint loss is constructed. The data fitting loss and the physical constraint loss are weighted, and the physical information neural network is trained based on the weighted data fitting loss and the physical constraint loss.

[0034] like Figure 2As shown, the network structure of the physical information neural network error prediction module includes an input layer, three hidden layers, and an output layer. The input layer has 25 nodes, corresponding to the posture data (rotation angle, angular velocity, angular acceleration) of six joints, end-effector load data, environmental temperature and humidity data, and theoretical trajectory command data for the six joints. The hidden layers have 64, 128, and 64 nodes respectively. During the calculation of the hidden layers, the kinematic equations of the robotic arm (such as the mapping relationship between link length, joint rotation angle, and end-effector pose) and dynamic equations (such as the relationship between joint torque and joint angular acceleration) are embedded as physical constraints. The output layer has 6 nodes, corresponding to the X, Y, and Z axis position errors and the posture errors around the X, Y, and Z axes of the end effector. During network training, the loss function is set as a weighted sum of the data fitting loss (MSE loss) and the physical constraint loss (mean squared error loss), with weight coefficients of 0.7 and 0.3 respectively. After training, the root mean square error of the model's error prediction can be controlled within 0.02 mm.

[0035] Building upon the standard fully connected network, an additional Physical-Informed Branch is added. This branch operates in parallel with the main network: the main network learns error feature maps from multi-source data and outputs predicted end-effector trajectory errors. The Physical-Informed Branch receives features from the hidden layers of the main network, maps them to joint angle corrections, and then calculates the theoretical end-effector pose and joint torques using differentiable forward kinematics / dynamics equations of the robotic arm.

[0036] The physical constraint branch transforms the physical equations into a differentiable computational graph, which participates in forward and backward propagation together with the main network. During the hidden layer computation, the features of the main network flow in two directions simultaneously: towards the output layer to generate error predictions; and towards the physical constraint branch to construct the physical constraint loss.

[0037] In one example, the loss function of the physical information neural network consists of two parts: data fitting loss and physical constraint loss. The data fitting loss is used to ensure the model's accuracy in fitting the measured error data, while the physical constraint loss is used to constrain the model's output to conform to the kinematics and dynamics of the robotic arm.

[0038] Physical constraint loss L phy Loss due to kinematic constraints L kin and dynamic constraint loss L dyn Weighted composition, its physical constraint loss L phy It can be represented as:

[0039] Kinematic constraint lossL kin It can be represented as:

[0040] Dynamic constraint loss L dyn It can be represented as:

[0041] in, Represents loss due to kinematic constraints L kin The corresponding weights Represents loss due to dynamic constraints L dyn The corresponding weights This indicates that the prediction of the first step in the robotic arm is based on physical information neural network. The end-effector pose calculated using the positive kinematic equations for each joint angle. This indicates the actual end-effector pose acquired. This indicates the total number of joints in the robotic arm. Represents the square of the norm. Indicates the first in the robotic arm Joint torque.

[0042] In one example, the total loss function can be expressed as: L total =0.7 L data +0.3 L phy in, L total The MSE represents the difference between the prediction error and the measured error of a neural network for physical information. L data The weighting coefficients 0.7 and 0.3 represent the data fitting loss, and were obtained through experimental optimization.

[0043] During the training phase, the physical constraint branch is trained together with the main network, and the gradient updates the parameters of both the main network and the physical constraint branch simultaneously, so that the model always follows the physical motion constraints of the robotic arm while learning the error patterns.

[0044] During the inference phase, the physical constraint branch does not participate in the forward computation and only uses the error prediction value output by the main network to ensure inference efficiency; if strict verification of physical feasibility is required, the branch can be enabled for posterior verification.

[0045] Step S3: Based on the trajectory error prediction value and the inverse kinematics solver corresponding to the robotic arm, calculate the joint angle correction amount corresponding to the robotic arm, and generate trajectory error compensation instructions based on the joint angle correction amount.

[0046] Based on the above embodiments, as an optional embodiment, step S3, which involves calculating the joint angle correction amount corresponding to the robotic arm based on the trajectory error prediction value and the inverse kinematics solver corresponding to the robotic arm, may further include the following steps: Step S31: Construct the target end-effector pose of the robotic arm based on the trajectory error prediction value, wherein the target end-effector pose represents the compensation combination between the end-effector pose corresponding to the given trajectory command and the trajectory error prediction value.

[0047] In this step, the end-effector pose corresponding to the given trajectory command is first obtained as the command pose, and the trajectory error prediction value output by the physical information neural network is obtained. The error prediction value includes at least the end-effector position error prediction component and the end-effector attitude error prediction component. Then, the error prediction value is characterized as an error compensation term that can be used for task space pose compensation. The error compensation term is then reverse-transformed according to the principle of "opposite to the direction of the prediction error" so that it can be used to cancel the deviation between the command pose and the actual motion. Finally, the command pose and the reversed error compensation term are combined to obtain the target end-effector pose.

[0048] Step S32: Using the target end pose as a constraint and the current joint angle as the initial value for iteration, the joint angle correction is iteratively solved using the inverse kinematics solver of the robotic arm to obtain the end pose error corresponding to the current joint angle.

[0049] In this step, the target end-effector pose is received and used as the constraint target of the inverse kinematics solver; at the same time, the joint angle state of the robot arm at the current moment is obtained and used as the initial joint angle for iterative solution.

[0050] Given the target end-effector pose constraints and initial joint angles, the inverse kinematics solver is started. In each iteration, based on the joint angle estimates obtained in the current iteration, the corresponding forward kinematics model of the robotic arm is called to calculate the current end-effector pose corresponding to the joint angle estimates, and the task space result used for comparison with the target end-effector pose is obtained.

[0051] The target end-effector pose is compared with the end-effector pose calculated in the current iteration to obtain the end-effector pose error, which includes at least position error components and attitude error components. Based on the end-effector pose error, the direction and magnitude of the joint angle corrections that need to be made are further determined, and the joint angle update amounts for this iteration are generated by the inverse kinematics solver to make the end-effector pose of the next iteration closer to the target end-effector pose.

[0052] Step S33: When the end-effector pose error is less than the preset error threshold, stop the iteration and make the inverse kinematics solver output the joint angle correction amount corresponding to the robotic arm.

[0053] In this embodiment, the trajectory error prediction value output by the physical information neural network is received and, combined with the inverse kinematics solver of the robotic arm, the angle correction amount that needs to be compensated for at each joint is calculated, generating joint compensation control commands. For the inverse kinematics solver in the compensation command generation module, a numerical iterative method (Levenberg-Marquardt algorithm) is used to solve the inverse kinematics. The core steps include:

[0054] At the current joint angle As initial values, calculate the end-effector pose error and iteratively update the joint angles using the Jacobian matrix:

[0055]

[0056] in, Indicates the first Joint angle at the next iteration Indicates the first Joint angle at the next iteration This represents the Jacobian matrix representing the end-effector pose relative to the joint angle at the current joint corner. This represents the transpose of the Jacobian matrix. Represents the identity matrix. This indicates the end-effector pose error. Indicates the target's end-effector pose. Indicates the current end-effector pose. This represents the damping coefficient, and the Jacobian matrix is ​​kept singular. The iteration continues until the pose error is less than a threshold (e.g., 0.01mm).

[0057] Furthermore, a clamping operation is performed on the joint angles obtained by iterative solution to obtain the transition joint angles. If the end pose error corresponding to the transition joint angle is greater than or equal to a preset error threshold, a transition trajectory that satisfies the joint limit condition is generated within the motion range corresponding to the target end pose. The iterative solution is then performed again based on the transition trajectory and the inverse kinematics solver to output the joint angle correction amount.

[0058] After each iteration update, clamping the joint angles can be represented as:

[0059] in, This represents the clamping function. Indicates the first The minimum allowable angle for each joint Indicates the first The maximum allowable angle of each joint.

[0060] In one example, the condition number of the Jacobian matrix is ​​monitored in real time. When the condition number exceeds a threshold (e.g., 1000), it is determined to be close to a singular configuration; the damping is increased. The coefficient is adjusted to reduce the iteration step size and avoid sudden changes in joint velocity. If convergence is still not achieved, a singularity avoidance strategy is triggered to adjust the target pose in the task space so that the robotic arm can move away from the singular region.

[0061] Based on the above embodiments, as an optional embodiment, step S3, which involves generating trajectory error compensation commands based on joint angle corrections, may further include the following steps: Step S34: Add the joint angle correction amount to the joint angle command corresponding to the given trajectory command to obtain the joint target angle. Step S35: The joint target angle is converted into a joint compensation control command that the robotic arm can execute. The joint compensation control command is used to drive the robotic arm to compensate for the end-effector trajectory error.

[0062] In this embodiment, by first forming the target joint angle and then converting it into joint compensation control instructions that the controller can execute, the compensation logic is better compatible with the existing robotic arm control framework, reducing the difficulty of implementation. Furthermore, by directly superimposing the joint angle correction amount onto the joint angle instruction corresponding to the given trajectory instruction, corrections can be made without destroying the original motion intention. This makes the end-effector error compensation more consistent and the transition smoother at the control level. Converting the target joint angle into control instructions that the robotic arm can execute is essentially an adaptation of the control quantity format, control mode, scale / unit, boundary constraints, etc., which can usually reduce execution jitter, saturation, or error amplification problems caused by interface mismatch.

[0063] In one example, the process of generating trajectory error compensation instructions also includes: Based on the load weight data, ambient temperature and humidity data at the end effector interface of the robotic arm, the corresponding working condition label of the robotic arm is determined. The output frequency and correction magnitude of the trajectory error compensation command are adjusted according to the working condition label. The output frequency includes increasing the output frequency under heavy load conditions and decreasing the output frequency under high temperature conditions. The correction magnitude includes smoothing the joint angle correction amount under severe motion conditions.

[0064] Furthermore, the operating condition identification algorithm adaptively adjusts the output frequency and correction amplitude of compensation commands based on load and environmental parameter changes to avoid overcompensation or undercompensation. The rule layer in the operating condition identification algorithm quickly identifies typical operating conditions based on the rate and absolute value of change in load, temperature, and humidity, such as no-load / heavy-load, normal temperature / high temperature, and dry / humid conditions. For mixed operating conditions that the rule layer cannot clearly classify, such as heavy load + high temperature, the decision tree layer in the algorithm outputs operating condition labels through a decision tree classifier to guide the adjustment of the compensation strategy. The operating condition characteristics and processing methods are shown in Table 1.

[0065] Table 1

[0066] Heavy load conditions (load > 3kg): Increase the output frequency of compensation commands (up to 100Hz) to increase the upper limit of angle correction. High temperature conditions (temperature > 40℃): Reduce the output frequency of compensation commands (up to 25Hz) to avoid overcompensation caused by thermal expansion and contraction of the connecting rod. Severe motion conditions (root mean square angular velocity > 60° / s): Enable smoothing filtering and perform low-pass filtering on the angle correction amount to improve motion smoothness.

[0067] Step S4: Send the trajectory error compensation command to the controller corresponding to the robotic arm to drive the robotic arm to run, so as to compensate for the end trajectory error of the robotic arm.

[0068] In this step, the industrial Ethernet communication protocol is used to send compensation commands to the robotic arm controller to drive the joint motors to complete trajectory error compensation. On the other hand, the real-time operating status of the robotic arm is fed back to the error prediction module to realize online adaptive optimization of the model.

[0069] like Figure 3 As shown, the specific workflow of this solution is as follows: Data acquisition phase: When the robotic arm receives the motion command and starts running, each sensor synchronously collects joint posture, end-effector load, ambient temperature and humidity, and actual end-effector pose data. After filtering, noise reduction, and timestamp alignment, the data is transmitted to the physical information neural network. Error prediction stage: The received data is input into the trained physical information neural network. The physical information neural network combines the physical constraints to output the predicted value of the terminal trajectory error. If the prediction error of the physical information neural network exceeds the preset threshold, the early warning mechanism of updating the physical information neural network is triggered. Compensation command generation stage: Upon receiving the error prediction value sent by the physical information neural network, the inverse kinematics solver of the robotic arm is called to calculate the angle correction amount corresponding to the 6 joints. At the same time, the working condition identification unit adjusts the output frequency of the compensation command to be consistent with the movement frequency of the robotic arm based on the current load and environmental parameters. Command execution and feedback phase: The compensation command is sent to the robotic arm controller via the Modbus TCP protocol. The controller adjusts the drive signal of the joint motor according to the compensation command to complete the trajectory error compensation. At the same time, the real-time joint status of the robotic arm is fed back to the physical information neural network to realize the online parameter fine-tuning of the model.

[0070] Compared to traditional PID compensation schemes and traditional BP neural network compensation systems, this paper presents a 6-layer BP network trained with measured data, a 6-axis lightweight collaborative robotic arm with a load range of 0-5kg, an ambient temperature of 20-50℃, and a humidity of 30-80%RH. The robotic arm trajectory types include straight lines, circular arcs, and complex spatial curves. Table 2 shows the test scenarios and evaluation indicators corresponding to the existing schemes, and the test data compared with the scheme are shown in Table 3.

[0071] Table 2

[0072] Table 3

[0073] In this embodiment, a physical information neural network is used to predict the trajectory error corresponding to the end effector trajectory, and the prediction result is mapped to the joint angle correction amount. Then, a compensation command is issued, thereby effectively reducing the deviation of the end effector trajectory and achieving higher precision trajectory tracking. Since the error compensation does not completely rely on a precise mathematical model, but learns the unmodeled or inaccurately modeled parts of the system through a data-driven approach, it can still maintain a good compensation effect when the robot arm parameters change, external disturbances occur, or the model has uncertainties. The robot arm collects running status data in real time while executing the trajectory, outputs error prediction in real time, and generates compensation commands to form a closed-loop update process. This can correct dynamic errors in a timely manner and improve control response capability. At the same time, through online prediction and continuous compensation, the trend of error gradually increasing with the execution process can be suppressed, thereby reducing the impact of long-term drift. Physical information neural networks usually integrate physical laws into network training and inference, making the network output more consistent with the real behavior of the system. Thus, it still has good generalization performance under the conditions of limited data and changing scenarios, thereby improving the accuracy and stability of the robot arm movement.

[0074] Based on the above method, this application discloses a robotic arm trajectory error compensation system based on a physical information neural network, with reference to... Figure 4 The robotic arm trajectory error compensation system 1 includes a data acquisition module 11, a data processing module 12, and a pose compensation module 13, wherein... The data acquisition module 11 is used to collect the operating status data of the robotic arm during the execution of a given trajectory command; The data processing module 12 is used to input the running status data into the physical information neural network so that the physical information neural network outputs the trajectory error prediction value corresponding to the end trajectory of the robot arm. Based on the trajectory error prediction value and the inverse kinematics solver corresponding to the robot arm, the module calculates the joint angle correction amount corresponding to the robot arm and generates the trajectory error compensation instruction based on the joint angle correction amount. The pose compensation module 13 is used to send trajectory error compensation instructions to the controller corresponding to the robotic arm to drive the robotic arm to run, so as to compensate for the end trajectory error of the robotic arm.

[0075] In one example, the operational status data includes the real-time rotation angle of each joint in the robotic arm, the angular velocity of each joint, the angular acceleration data of each joint, the actual pose data of the end effector in the robotic arm, the load weight data at the interface of the end effector in the robotic arm, the ambient temperature and humidity data, and the theoretical trajectory command data of the robotic arm.

[0076] In one example, the data processing module 12 is used to construct the input layer, hidden layer, and output layer of the physical information neural network, so that the physical information neural network receives running status data and outputs trajectory error prediction values; physical constraint branches are constructed in parallel on the hidden layer features of the physical information neural network, so that the physical constraint branches map the hidden layer features to joint angle correction amounts; based on the prediction error and measured error in the output layer, a data fitting loss is constructed, and based on the theoretical quantity formed by the physical constraint branch and the actual measurement corresponding to the theoretical quantity, a physical constraint loss is constructed; the data fitting loss and the physical constraint loss are weighted, and the physical information neural network is trained according to the weighted data fitting loss and the physical constraint loss.

[0077] In one example, the data processing module 12 is used to construct the target end-effector pose of the robotic arm based on the trajectory error prediction value, wherein the target end-effector pose represents the compensation combination between the end-effector pose corresponding to a given trajectory command and the trajectory error prediction value; using the target end-effector pose as a constraint and the current joint angle as the initial value of the iteration, the inverse kinematics solver of the robotic arm iteratively solves the joint angle correction amount to obtain the end-effector pose error corresponding to the current joint angle; when the end-effector pose error is less than a preset error threshold, the iteration stops, and the inverse kinematics solver outputs the joint angle correction amount corresponding to the robotic arm.

[0078] In one example, the data processing module 12 is used to perform a clamping operation on the joint angles obtained by iterative solution to obtain the transition joint angles; if the end pose error corresponding to the transition joint angle is greater than or equal to a preset error threshold, a transition trajectory that meets the joint limit condition is generated within the motion range corresponding to the target end pose, and the iterative solution is performed again based on the transition trajectory and the inverse kinematics solver to output the joint angle correction amount.

[0079] In one example, the data processing module 12 is used to superimpose the joint angle correction amount onto the joint angle command corresponding to the given trajectory command to obtain the joint target angle; and convert the joint target angle into a joint compensation control command that can be executed by the robotic arm. The joint compensation control command is used to drive the robotic arm to compensate for the end-effector trajectory error.

[0080] In one example, the process of generating trajectory error compensation instructions also includes: Based on the load weight data, ambient temperature and humidity data at the end effector interface of the robotic arm, the corresponding working condition label of the robotic arm is determined. The output frequency and correction magnitude of the trajectory error compensation command are adjusted according to the working condition label. The output frequency includes increasing the output frequency under heavy load conditions and decreasing the output frequency under high temperature conditions. The correction magnitude includes smoothing the joint angle correction amount under severe motion conditions.

[0081] Please see Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device 2 may include: at least one processor 21, at least one network interface 24, user interface 23, memory 25, and at least one communication bus 22.

[0082] The communication bus 22 is used to enable communication between these components.

[0083] The user interface 23 may include a display screen and a camera. Optionally, the user interface 23 may also include a standard wired interface and a wireless interface.

[0084] The network interface 24 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0085] The processor 21 may include one or more processing cores. The processor 21 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 25, and by calling data stored in the memory 25. Optionally, the processor 21 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 21 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor 21.

[0086] The memory 25 may include random access memory (RAM) or read-only memory. Optionally, the memory 25 may include non-transitory computer-readable storage medium. The memory 25 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 25 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 25 may also be at least one storage device located remotely from the aforementioned processor 21. Figure 5 As shown, the memory 25, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for a robotic arm trajectory error compensation method based on a physical information neural network.

[0087] exist Figure 5In the electronic device 2 shown, the user interface 23 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 21 can be used to call the application program stored in the memory 25, which is a method for compensating the trajectory error of a robotic arm based on a physical information neural network. When executed by one or more processors, the electronic device executes one or more methods as described in the above embodiments.

[0088] A non-transitory computer-readable storage medium stores instructions that, when executed by one or more processors, cause a computer to perform one or more methods as described in the above embodiments.

[0089] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0090] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0091] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings or direct couplings or communication connections may be through some service interfaces; indirect couplings or communication connections between apparatuses or units may be electrical or other forms.

[0092] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0093] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0094] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0095] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for compensating for trajectory errors of a robotic arm based on a physical information neural network, characterized in that, The method includes: During the execution of a given trajectory command by the robotic arm, the operating status data of the robotic arm is collected; The operating status data is input into a physical information neural network so that the physical information neural network outputs a trajectory error prediction value corresponding to the end trajectory of the robotic arm. Based on the predicted trajectory error value and the inverse kinematics solver corresponding to the robotic arm, the joint angle correction amount corresponding to the robotic arm is calculated, and a trajectory error compensation command is generated based on the joint angle correction amount. The trajectory error compensation command is sent to the controller corresponding to the robotic arm to drive the robotic arm to run, so as to compensate for the end trajectory error of the robotic arm.

2. The method for compensating for robotic arm trajectory errors based on a physical information neural network as described in claim 1, characterized in that, The operational status data includes the real-time rotation angle of each joint in the robotic arm, the angular velocity of each joint, the angular acceleration data of each joint, the actual pose data of the end effector in the robotic arm, the load weight data at the interface of the end effector in the robotic arm, the ambient temperature and humidity data, and the theoretical trajectory command data of the robotic arm.

3. The method for compensating for trajectory errors of a robotic arm based on a physical information neural network as described in claim 1, characterized in that, The construction process of the physical information neural network includes: The physical information neural network is constructed with an input layer, a hidden layer, and an output layer, so that the physical information neural network receives the running state data and outputs the trajectory error prediction value; Physical constraint branches are constructed in parallel on the hidden layer features of the physical information neural network, so that the physical constraint branches map the hidden layer features into joint angle correction amounts; Based on the prediction error and measured error in the output layer, a data fitting loss is constructed, and based on the theoretical quantity formed by the physical constraint branch and the measured quantity corresponding to the theoretical quantity, a physical constraint loss is constructed. The data fitting loss and the physical constraint loss are weighted, and the physical information neural network is trained based on the weighted data fitting loss and the physical constraint loss.

4. The method for compensating for trajectory errors of a robotic arm based on a physical information neural network as described in claim 3, characterized in that, Based on the predicted trajectory error value and the inverse kinematics solver corresponding to the robotic arm, the joint angle correction amount corresponding to the robotic arm is calculated, specifically including: Based on the trajectory error prediction value, the target end-effector pose of the robotic arm is constructed, wherein the target end-effector pose represents the compensation combination between the end-effector pose corresponding to the given trajectory command and the trajectory error prediction value; Using the target end pose as a constraint and the current joint angle as the initial value for iteration, the joint angle correction is iteratively solved by the inverse kinematics solver of the robotic arm to obtain the end pose error corresponding to the current joint angle. When the end-effector pose error is less than a preset error threshold, the iteration stops, and the inverse kinematics solver outputs the joint angle correction amount corresponding to the robotic arm.

5. The method for compensating for trajectory errors of a robotic arm based on a physical information neural network as described in claim 4, characterized in that, The method further includes: Perform a clamping operation on the joint angles obtained through iterative solving to obtain the transition joint angles; If the end pose error corresponding to the transition joint angle is greater than or equal to the preset error threshold, a transition trajectory that satisfies the joint limit condition is generated within the motion range corresponding to the target end pose. The transition trajectory and the inverse kinematics solver are then used to iterate and solve the problem again to output the joint angle correction amount.

6. The method for compensating for trajectory errors of a robotic arm based on a physical information neural network as described in claim 2, characterized in that, The step of generating trajectory error compensation instructions based on the joint angle correction amount specifically includes: The joint angle correction amount is superimposed on the joint angle command corresponding to the given trajectory command to obtain the joint target angle; The target joint angle is converted into a joint compensation control command that the robotic arm can execute. The joint compensation control command is used to drive the robotic arm to compensate for the end-effector trajectory error.

7. The method for compensating for trajectory errors of a robotic arm based on a physical information neural network as described in claim 6, characterized in that, The process of generating the trajectory error compensation command also includes: Based on the load weight data at the end effector interface of the robotic arm, the ambient temperature data, and the ambient humidity data, the corresponding working condition label of the robotic arm is determined; The output frequency and correction magnitude of the trajectory error compensation command are adjusted according to the working condition label. The output frequency includes increasing the output frequency under heavy load conditions and decreasing the output frequency under high temperature conditions. The correction magnitude includes smoothing the joint angle correction amount under severe motion conditions.

8. A robotic arm trajectory error compensation system based on a physical information neural network, characterized in that, The robotic arm trajectory error compensation system includes a data acquisition module, a data processing module, and a pose compensation module, wherein... The data acquisition module is used to collect the operating status data of the robotic arm during the execution of a given trajectory command; The data processing module is used to input the running status data into the physical information neural network, so that the physical information neural network outputs the trajectory error prediction value corresponding to the end trajectory of the robotic arm, calculates the joint angle correction amount corresponding to the robotic arm based on the trajectory error prediction value and the inverse kinematics solver corresponding to the robotic arm, and generates a trajectory error compensation command based on the joint angle correction amount. The pose compensation module is used to send the trajectory error compensation command to the controller corresponding to the robotic arm to drive the robotic arm to run, so as to compensate for the end trajectory error of the robotic arm.

9. An electronic device, characterized in that, The device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • A motion control method and device for a robotic arm

    CN112077839B