Six-axis force sensor gravity compensation method and system for robotic machining
By combining Euler angles, robot inverse kinematics, and deep learning algorithms, the problems of anisotropy of reference values and gravity measurement errors of six-dimensional force sensors in robot machining were solved, achieving high-precision gravity compensation and improving the accuracy and stability of robot machining.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAZHONG UNIV OF SCI & TECH
- Filing Date
- 2024-03-21
- Publication Date
- 2026-07-03
Smart Images

Figure CN118514065B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of mechanical manufacturing technology, and in particular relates to a method and system for gravity compensation of a six-dimensional force sensor in robot processing. Background Technology
[0002] During the machining process, various burrs are generated on mechanical parts. Residual burrs affect the quality and appearance of the parts, reduce their performance, and cause numerous inconveniences in subsequent inspection and assembly processes. With the increasing industrialization and automation, the precision requirements for component manufacturing, especially in precision machining, instrumentation, aerospace, and aviation fields, are becoming increasingly stringent, making the hazards of burrs more and more apparent. Using robots to deburr mechanical parts offers advantages such as safety, low cost, high flexibility, intelligence, and high efficiency. However, due to the anisotropy of the six-dimensional force sensor's reference value, force control errors occur. Therefore, accurate gravity compensation for the six-dimensional force sensor mounted on the robot flange and the end effector is a problem that needs to be solved in robotic machining.
[0003] When the six-dimensional force sensor and end effector are mounted on the robot flange, the reference value of the sensor will fluctuate under different postures when it is not subject to its own gravity or other external forces. This will cause systematic errors in the traditional gravity compensation method and affect the machining accuracy.
[0004] Based on the above analysis, the problems and defects of the existing technology are as follows: the reference value of the sensor will fluctuate when it is not subject to its own gravity or other external forces, which will cause systematic errors in the traditional gravity compensation method and affect the processing accuracy. Summary of the Invention
[0005] To address the shortcomings or improvement needs of existing technologies, this invention provides a six-dimensional force sensor gravity compensation method and system for robotic machining. It uses Euler angles and robot inverse kinematics to obtain the sensor's pose during deburring, performs preliminary gravity compensation through static methods, divides the robot's deburring workspace using the constraint that the continuous movement of the robot's flange joint does not reach the extreme value of the joint angle, employs a Latin hypercube sampling algorithm to obtain a dataset of systematic errors in gravity compensation, and uses a long short-term memory network to train a predictive model for the systematic errors in gravity compensation. This solves the problems of anisotropy of the six-dimensional force sensor reference value and poor accuracy of traditional gravity compensation methods during robotic deburring.
[0006] This invention is implemented as follows: a gravity compensation method for a robot-manufactured six-dimensional force sensor. This method combines static calculation with deep learning. First, statics are used to obtain the sensor's baseline value and centroid coordinates for preliminary gravity compensation. Then, the robot's workspace is divided into sampling intervals to collect systematic errors. Next, a Long Short-Term Memory (LSTM) deep learning algorithm is used to predict and compensate for these systematic errors, achieving high-precision gravity compensation. The core innovation lies in combining traditional static calculation with modern deep learning technology; this two-step compensation strategy ensures the sensor's high accuracy and robustness.
[0007] Furthermore, including:
[0008] S1, planning six postures in which the gravity of the sensor and actuator acts only in the positive and negative directions of each coordinate axis of the sensor coordinate system;
[0009] S2. Based on the pose of the sensor coordinate system, the rotation angles of the robot's six joints are calculated using robot inverse kinematics. The robot is then controlled to move to the corresponding pose, and the sensor readings are recorded.
[0010] S3, based on the readings under 6 poses, uses statics to calculate the reference value of the sensor when it is not subjected to external force, and calculates the total weight of the sensor and actuator and the centroid coordinates in the sensor coordinate system based on the sensor reference value;
[0011] S4, perform the first gravity compensation based on the total weight and center of mass coordinates of the sensor and actuator;
[0012] S5, using the RPY angle to represent the workspace of the robot deburring process, with the constraint that the robot flange joint does not touch the extreme value of the joint angle during continuous movement, the workspace is divided into 4 sampling intervals.
[0013] S6. The input point set is obtained using the Latin hypercube sampling method. The attitude of each point relative to the robot's base coordinate system is calculated based on the RPY angle. The systematic error Δc of gravity compensation when the robot moves to each point is collected.
[0014] S7 uses a long short-term memory network deep learning algorithm to train a gravity compensation system error prediction model;
[0015] S8, based on the gravity compensation systematic error prediction model, compensates for the systematic error on the basis of the first gravity compensation, and obtains a high-precision gravity compensation result.
[0016] Furthermore, S1 includes: obtaining the corresponding rotation matrix based on the planned Euler angles, and the sensor coordinate system rotation matrix. for:
[0017] in The rotation matrix of the sensor coordinate system s relative to the robot base coordinate system b is obtained based on Euler angles. It is the rotation matrix corresponding to the rotation α around the z-axis.
[0018] It is the rotation matrix corresponding to the rotation β around the y-axis.
[0019] It is the rotation matrix corresponding to the rotation γ around the x-axis; according to the attitude planned by Euler angles, it finds the reachable, interference-free position coordinates in the robot's workspace after installing the six-dimensional force sensor and actuator.
[0020] Furthermore, S2 includes: based on the rotation matrix and position coordinates of each planned pose, the rotation angles of the six joint axes when the robot moves to each pose can be calculated using the robot's inverse kinematics.
[0021]
[0022] in, It is the transformation matrix between the robot's joint axis coordinate systems, θ n+1 These are the rotation angles of the robot's joint axes. It is the transformation matrix of the sensor coordinate system s relative to the robot's 6th axis coordinate system.
[0023] The reading of the six-dimensional force sensor in the first pose 1 is (f x1 ,f y1 ,f z1 ,t x1 ,t y1 ,t z1 ), where f 力维度+姿态下标 These are the readings of the six-dimensional force sensor in the corresponding dimension and posture. The other five postures, pose2, pose3, pose4, pose5, and pose6, follow the same pattern.
[0024] Furthermore, S3 includes: sensor reference value (F x0 ,F y0 ,F z0 ,T x0 ,T y0 ,T z0 )for:
[0025]
[0026]
[0027]
[0028] Among them (F)x0 ,F y0 ,F z0 ,T x0 ,T y0 ,T z0 () is the reference value of the sensor when it is not subject to its own gravity or other external forces.
[0029] Total gravity G a and the coordinates of the total centroid {C x C y C z}for:
[0030]
[0031]
[0032]
[0033]
[0034] Among them G a It is the total gravity of the six-dimensional force sensor and the end effector, {C x C y C z} represents the coordinates of the global centroid.
[0035] Furthermore, S4 includes: the component of the total gravity in each coordinate system of the sensor coordinate system (G x G y G z ) and component torque are
[0036] G x =-G a ·cos(z b ,x c M x =G z ·C y -G y ·C z
[0037] G y =-G a ·cos(z b ,y c M y =G x ·C z -G z ·C x
[0038] G z =-G a ·cos(z b ,z cM z =G y ·C x -G x ·C y
[0039] Where cos(z) b ,x c ), cos(z) b ,y c ), cos(z) b ,z c ) is the cosine of the angle between the z-axis of the robot's base coordinate system and the three coordinate axes of the sensor coordinate system.
[0040] The result of the first gravity compensation (R) Fx ,R Fy ,R Fz ,R Tx ,R Ty ,R Tz )for
[0041] R Fx =F x -F x0 -G x
[0042] R Fy =F y -F y0 -G y
[0043] R Fz =F z -F z0 -G z
[0044] R Tx =T x -T x0 -M x
[0045] R Ty =T y -T y0 -M y
[0046] R Tz =T z -T z0 -M z
[0047] Among them, R 力维度 It is the force measurement value (result) after the first gravity compensation is completed in the corresponding dimension.
[0048] Furthermore, S5 includes: In the robot's deburring operation, the rotation of the sensor coordinate system in the x-axis and y-axis directions will not exceed 30°, therefore the attitude workspace represented by the RPY angle is...
[0049] R(z,±180°)·R(y,±30°)·R(x,±30°)
[0050] To ensure that the robot's flange joint axis does not exceed the 360° joint limit when continuously acquiring gravity error data within the deburring workspace, the deburring workspace is divided into four 90° acquisition intervals based on the z-axis rotation range of the sensor coordinate system, where α... z It is the rotation angle around the z-axis of the sensor coordinate system in the RPY angle representation.
[0051] Furthermore, S6 includes: Due to the combined gravity of the sensor and the actuator acting on the sensor strain gauge, the sensor reference value will fluctuate slightly under different postures. Therefore, after the first gravity compensation, the compensation result still has systematic errors.
[0052] The systematic error Δc of the first gravity compensation is:
[0053] Δc=Δb+Δg
[0054] Where Δb is the sensor reference value error caused by the anisotropy of the sensor reference value, and Δg is the error in the total gravity calculation of the sensor and the end effector caused by the sensor measurement accuracy.
[0055] Latin hypercube sampling was used to generate 2500 sampling points in each of the four sampling intervals.
[0056] Within each sampling interval, the robot is continuously moved to each sampling point, and the sensor readings are recorded after the first gravity compensation when the sensor is not subjected to external force. This reading is the systematic error Δc of the sensor gravity compensation system under the corresponding posture.
[0057] Furthermore, S7 includes: a deep learning algorithm that uses a Long Short-Term Memory (LSTM) network as the training method for predicting systematic errors in gravity compensation. Specifically:
[0058] A Long Short-Term Memory (LSTM) network was trained using a dataset of 10,000 {attitude, gravity compensation systematic errors} obtained across four sampling intervals as input and output pairs. The input is the 3D sensor attitude, and the output is the predicted 6D sensor gravity compensation systematic errors. ReLU was used as the activation function. The mean squared loss error (MSELoss) was used as the loss function. A variable learning rate was adopted, with an initial learning rate of 0.01; after 50,000 training rounds, it became 0.001; after 200,000 rounds, it became 0.00001, and after a total of 300,000 rounds of training, a gravity compensation systematic error prediction model was obtained.
[0059] Furthermore, S8 includes: the force value R after compensation using a systematic error prediction model. end for:
[0060] R end =R F -f({r x ,r y ,r z})
[0061] Where R F This is the result of the first gravity compensation. f is the gravity compensation systematic error prediction model, whose input {r x ,r y ,r z} represents the 3D attitude of the sensor, and its output f({r x ,r y ,r z}) represents the 6-dimensional prediction error.
[0062] Another object of the present invention is to provide a six-dimensional force sensor gravity compensation system for robotic machining, comprising:
[0063] The gravity planning module is used to plan six orientations for the sensor and actuators where gravity acts only in the positive and negative directions of each coordinate axis of the sensor coordinate system.
[0064] The pose translation module is used to calculate the rotation angles of the robot's six joints using robot inverse kinematics based on the pose in the sensor coordinate system, control the robot to move to the corresponding pose, and record the sensor readings.
[0065] The centroid coordinate calculation module is used to calculate the reference value of the sensor when it is not subjected to external force based on the readings under 6 poses, and to calculate the total weight of the sensor and actuator and the centroid coordinates in the sensor coordinate system based on the sensor reference value.
[0066] The gravity compensation module is used to perform the first gravity compensation based on the total gravity and center of mass coordinates of the sensor and actuator.
[0067] The sampling interval division module is used to represent the workspace of the robot deburring process using the RPY angle. The workspace is divided into 4 sampling intervals with the constraint that the robot flange joint does not touch the extreme value of the joint angle during continuous movement.
[0068] The attitude calculation module is used to obtain the input point set using the Latin hypercube sampling method, calculate the attitude of each point relative to the robot's base coordinate system based on the RPY angle, and collect the systematic error Δc of gravity compensation when the robot moves to each point.
[0069] The prediction model training module is used to train a gravity compensation system error prediction model using a long short-term memory network deep learning algorithm.
[0070] The systematic error compensation module is used to compensate for systematic errors based on the first gravity compensation, according to the gravity compensation systematic error prediction model, to obtain high-precision gravity compensation results.
[0071] Another object of the present invention is to provide a computer device, the computer device including a memory and a processor, the memory storing a computer program, which, when executed by the processor, causes the processor to perform the steps of the six-dimensional force sensor gravity compensation method for robot processing.
[0072] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the six-dimensional force sensor gravity compensation method for robot processing.
[0073] Another objective of this invention is to provide an information data processing terminal for implementing the six-dimensional force sensor gravity compensation system for robot processing.
[0074] Based on the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solution to be protected by this invention are as follows:
[0075] First, this invention constructs a sampling method for the robot deburring workspace point set, collects the systematic compensation error of the initial gravity compensation, eliminates the inaccessibility and singularity of continuous sampling in the robot's workspace caused by the joint rotation limit, and proposes to use a gravity compensation systematic error prediction model for the second gravity compensation, which significantly improves the accuracy of gravity compensation of the six-dimensional force sensor and actuator in robot deburring.
[0076] S1: Plan six orientations for the sensor and actuators where gravity acts only in the positive and negative directions of each coordinate axis of the sensor coordinate system. This step provides an accurate baseline for precise calculation of gravity and torque in subsequent steps.
[0077] S2: Based on the sensor coordinate system pose, the rotation angles of the robot's six joints are calculated using robot inverse kinematics. The robot is then controlled to move to the corresponding pose, and the sensor readings are recorded. Through this step, the system can precisely control the robot's position and attitude, providing accurate input data for subsequent gravity compensation.
[0078] S3: Based on the readings in six different poses, static calculations are used to determine the sensor's baseline value when no external force is applied. Then, the total weight of the sensor and actuator, and the coordinates of their center of mass in the sensor coordinate system are calculated based on this baseline value. This step provides the necessary foundational data for subsequent gravity compensation.
[0079] S4: Perform the first gravity compensation based on the total weight and center of mass coordinates of the sensors and actuators. This is an important step, as gravity compensation at this stage can significantly improve the robot's operational accuracy.
[0080] S5: The workspace for the robot's deburring process is represented by the RPY angle. The workspace is divided into four sampling intervals, with the constraint that the robot's flange joints do not reach the extreme value of the joint angle during continuous movement. This step, through the division and constraint of the workspace, provides effective training data for the subsequent learning algorithm.
[0081] S6: The input point set is obtained using the Latin hypercube sampling method. The pose of each point relative to the robot's base coordinate system is calculated based on the RPY angles, and the systematic error of gravity compensation when the robot moves to each point is collected. This step further provides high-quality training data, laying the foundation for subsequent deep learning algorithms.
[0082] S7: Train a gravity compensation systematic error prediction model using a Long Short-Term Memory (LSTM) deep learning algorithm. This step represents a significant technological advancement, enabling the system to learn gravity compensation patterns and predict systematic errors through deep learning algorithms.
[0083] S8: Based on the gravity compensation systematic error prediction model, the systematic error is compensated for on the basis of the first gravity compensation, and a high-precision gravity compensation result is obtained. This is the final step and a significant technological advancement. Through this step, the system can obtain a high-precision gravity compensation result, greatly improving the robot's operational accuracy and stability.
[0084] Secondly, this invention significantly improves the gravity compensation accuracy of the six-dimensional force sensor, which will greatly enhance processing precision in robotics and other related intelligent manufacturing fields, improving product surface finish, including contours, edges, and internal and external surfaces. Applicable scenarios include, but are not limited to, force-controlled robotic operations such as deburring, milling, grinding, polishing, assembly, and cutting. Improving product quality, reducing defect rates, and lowering production costs will bring substantial benefits to enterprises.
[0085] This invention significantly improves the gravity compensation accuracy of a six-dimensional force sensor. In view of the anisotropic error of the reference value and the gravity measurement error in the traditional gravity compensation method of the six-dimensional force sensor, a new gravity compensation method based on a deep learning model is proposed to compensate for the above errors, which greatly improves the gravity compensation accuracy of the six-dimensional force sensor.
[0086] This invention addresses the extreme values in joint rotation of articulated robots by constructing a segmented sampling method for the workspace point set of the robot to eliminate the inaccessibility and singularity of continuous sampling in the workspace caused by the joint rotation limits.
[0087] This invention solves the long-standing problem of compensating for anisotropic errors in the reference values of six-dimensional force sensors and errors in gravity measurements.
[0088] This invention uses a nonlinear model to predict the nonlinear error in gravity compensation of a six-dimensional force sensor, overcoming the technical bias of using linear models to calculate gravity compensation errors.
[0089] Third, the six-dimensional force sensor gravity compensation method for robot processing provided in this embodiment of the invention has achieved significant results in terms of technological advancement. The following is a detailed explanation of these technological advancements:
[0090] 1) An innovative combination of attitude planning and static analysis:
[0091] By planning six possible attitudes for the sensor and actuators, where the gravity acts only on the positive and negative axes of the sensor coordinate system, and combining this with static calculations, this invention can accurately determine the reference value of the sensor when it is not subjected to external forces, as well as the total gravity and center-of-mass coordinates of the sensor and actuators. This method, which combines attitude planning and static analysis, provides an accurate data foundation for subsequent gravity compensation, significantly improving the accuracy of gravity compensation.
[0092] 2) Intelligent workspace partitioning and systematic error acquisition:
[0093] This invention utilizes the RPY angle to represent the robot's workspace and divides the workspace into multiple sampling intervals based on the motion constraints of the robot's flange joints. The input point set is obtained through the Latin hypercube sampling method, and the gravity compensation systematic error at each point is collected, achieving comprehensive and efficient collection of systematic errors within the workspace. This intelligent workspace division and error collection method provides rich data support for subsequent error prediction model training.
[0094] 3) Application of deep learning in gravity compensation:
[0095] This invention introduces a Long Short-Term Memory (LSTM) deep learning algorithm to train a model for predicting systematic errors in gravity compensation. LSTM can handle long-term dependencies in time-series data, making it highly suitable for predicting systematic errors in gravity compensation for robots under different postures and working conditions. Through the application of deep learning algorithms, this invention achieves accurate prediction and compensation of systematic errors in gravity compensation, further improving the accuracy and stability of gravity compensation.
[0096] 4) Implementation of high-precision gravity compensation:
[0097] By combining initial gravity compensation with systematic error compensation based on a deep learning model, this invention achieves high-precision gravity compensation results. This dual compensation mechanism effectively eliminates the influence of gravity and other systematic errors in sensor measurements, providing more accurate and reliable force feedback information for robotic machining, thus helping to improve the quality and efficiency of robotic machining.
[0098] The six-dimensional force sensor gravity compensation method for robot machining provided in this invention has made significant technological progress in attitude planning and static analysis, workspace division and error acquisition, deep learning applications, and high-precision gravity compensation, making important contributions to the development of the field of robot machining. Attached Figure Description
[0099] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention 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.
[0100] Figure 1 This is a flowchart of a six-dimensional force sensor gravity compensation method for robot processing provided in an embodiment of the present invention;
[0101] Figure 2 This is a schematic diagram of the six-dimensional force sensor gravity compensation system for robot processing provided in an embodiment of the present invention;
[0102] Figure 3 This is a flowchart of a six-dimensional force sensor gravity compensation method for robot deburring based on a long short-term memory network, provided in an embodiment of the present invention.
[0103] Figure 4 This is a schematic diagram of the Euler angles of the sensor coordinate system provided in an embodiment of the present invention;
[0104] Figure 5 This is a schematic diagram of the robot workspace sampling interval division provided in an embodiment of the present invention;
[0105] Figure 6 This is a schematic diagram of the long short-term memory network gravity compensation systematic error prediction model provided in the embodiment of the present invention. Detailed Implementation
[0106] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0107] The following are two specific embodiments of the six-dimensional force sensor gravity compensation method for robot processing provided in this invention:
[0108] Example 1:
[0109] On an automated production line, a robot equipped with a six-dimensional force sensor is used to deburr precision parts. The measurement accuracy is limited due to the influence of gravity on the sensor. To address this issue, the gravity compensation method of this invention is employed.
[0110] First, six possible poses were planned where the gravity of the sensors and actuators acts only in the positive and negative directions of the coordinate axes of the sensor coordinate system. Then, the corresponding joint angles were calculated using the robot's inverse kinematics, the robot was controlled to move to these poses, and the sensor readings were recorded.
[0111] Next, based on these readings, the reference value of the sensor when it is not subjected to external force was calculated using statics, and the total weight of the sensor and actuator and the coordinates of the center of mass in the sensor coordinate system were further calculated.
[0112] With this information, the first gravity compensation was performed. However, some systematic errors were still found in the compensated result. To further improve accuracy, the robot's workspace was divided into four sampling intervals, and the Latin hypercube sampling method was used to obtain the input point set. The attitude of each point relative to the robot's base coordinate system was calculated, and the systematic errors of gravity compensation when the robot moved to each point were collected.
[0113] Then, a gravity compensation systematic error prediction model was trained using a Long Short-Term Memory (LSTM) deep learning algorithm. In subsequent processing, based on this model, systematic errors were further compensated for on the basis of the first gravity compensation, thus obtaining a high-precision gravity compensation result.
[0114] Example 2:
[0115] In another scenario, a multi-jointed industrial robot was used to polish complex surfaces. Due to the complexity of the working environment and the influence of gravity on the polishing tools, the measurement accuracy of the six-dimensional force sensor was also affected.
[0116] Similarly, six postures were first planned, and the robot's joint angles were calculated using inverse kinematics. The sensor readings in different postures were recorded. Through static calculations, the baseline values of the sensors when no external force was applied, as well as the total gravity and center of mass coordinates, were obtained.
[0117] After the initial gravity compensation, it was noted that the effect was not ideal under certain robot postures. To address this issue, a method similar to that in Example 1 was adopted, dividing the workspace into intervals and collecting systematic error data.
[0118] Sufficient input point sets were obtained using the Latin hypercube sampling method, and a prediction model was trained using a deep learning algorithm. In subsequent polishing operations, the results of the first gravity compensation were corrected based on this model, thereby achieving high-precision gravity compensation.
[0119] These two embodiments demonstrate the application methods and effects of the present invention in different application scenarios, proving the effectiveness and practicality of the present invention in improving the measurement accuracy of six-dimensional force sensors.
[0120] To address the problems existing in the prior art, the present invention provides a method and system for gravity compensation of a six-dimensional force sensor in robot processing. The present invention will be described in detail below with reference to the accompanying drawings.
[0121] like Figure 1 As shown in the embodiment of the present invention, the gravity compensation method for a six-dimensional force sensor processed by a robot includes:
[0122] S1, planning six postures in which the gravity of the sensor and actuator acts only in the positive and negative directions of each coordinate axis of the sensor coordinate system;
[0123] S2. Based on the pose of the sensor coordinate system, the rotation angles of the robot's six joints are calculated using robot inverse kinematics. The robot is then controlled to move to the corresponding pose, and the sensor readings are recorded.
[0124] S3, based on the readings under 6 poses, uses statics to calculate the reference value of the sensor when it is not subjected to external force, and calculates the total weight of the sensor and actuator and the centroid coordinates in the sensor coordinate system based on the sensor reference value;
[0125] S4, perform the first gravity compensation based on the total weight and center of mass coordinates of the sensor and actuator;
[0126] S5, using the RPY angle to represent the workspace of the robot deburring process, with the constraint that the robot flange joint does not touch the extreme value of the joint angle during continuous movement, the workspace is divided into 4 sampling intervals.
[0127] S6. The input point set is obtained using the Latin hypercube sampling method. The attitude of each point relative to the robot's base coordinate system is calculated based on the RPY angle. The systematic error Δc of gravity compensation when the robot moves to each point is collected.
[0128] S7 uses a long short-term memory network deep learning algorithm to train a gravity compensation system error prediction model;
[0129] S8, based on the gravity compensation systematic error prediction model, compensates for the systematic error on the basis of the first gravity compensation, and obtains a high-precision gravity compensation result.
[0130] The six-dimensional force sensor gravity compensation method for robotic machining described in this embodiment of the invention is a meticulously designed process aimed at accurately compensating for the effects of gravity through a series of steps, thereby improving the precision and efficiency of the machining process. The signal and data processing procedures within this process will be discussed in detail below.
[0131] ###S1 to S3: Baseline Value Calculation
[0132] First, by planning the positions of sensors and actuators in six different postures—akin to having a dancer perform different movements on stage—the robot's ability to perceive the effect of gravity on its movements is established. Then, using inverse kinematics—like given an endpoint and calculating the starting point—the robot is controlled to move into these six specific postures, recording sensor readings. The data collected in this process is the raw material, which is then transformed into useful information. Through static calculations, a baseline value for the sensors when no external force is applied can be derived. Essentially, this means determining "what information the sensors should convey under ideal conditions." This baseline value reveals how gravity affects sensor readings.
[0133] ###S4: First Gravity Compensation
[0134] Next, using the calculated total gravity and center of mass coordinates, the first gravity compensation is performed, much like a preliminary calibration of an instrument to ensure it can accurately produce the desired notes.
[0135] ###S5 to S6: Collection of Systematic Errors
[0136] To further improve accuracy, the robot's workspace was divided into four sampling intervals, and the Latin hypercube sampling method was used to select test points. This is similar to selecting representative fruit trees in an orchard to sample and evaluate the overall fruit quality of the orchard. This method collected systematic error data at different working positions, providing "nutrients" for subsequent deep learning model training.
[0137] ###S7: Deep Learning Model Training
[0138] Training a gravity-compensated systematic error prediction model using a Long Short-Term Memory (LSTM) deep learning algorithm is like training a student with a super memory, able to remember every mistake and learn from it in order to make better predictions in the future.
[0139] ###S8: High-precision gravity compensation
[0140] Finally, based on the trained model, systematic errors are further compensated for on top of the initial gravity compensation, achieving high-precision gravity compensation. This step is like giving a musical instrument a final fine-tuning, ensuring it can achieve optimal performance during playing.
[0141] This process, through meticulous planning, data acquisition, analysis, and learning, ultimately achieved high-precision compensation for the effects of gravity, thereby improving the efficiency and accuracy of robotic processing. This is not only an innovation in sensor technology but also demonstrates the powerful application potential of data processing and machine learning in modern manufacturing.
[0142] like Figure 2 As shown, the six-dimensional force sensor gravity compensation system for robot processing provided in this embodiment of the invention includes:
[0143] The gravity planning module is used to plan six orientations for the sensor and actuators where gravity acts only in the positive and negative directions of each coordinate axis of the sensor coordinate system.
[0144] The pose translation module is used to calculate the rotation angles of the robot's six joints using robot inverse kinematics based on the pose in the sensor coordinate system, control the robot to move to the corresponding pose, and record the sensor readings.
[0145] The centroid coordinate calculation module is used to calculate the reference value of the sensor when it is not subjected to external force based on the readings under 6 poses, and to calculate the total weight of the sensor and actuator and the centroid coordinates in the sensor coordinate system based on the sensor reference value.
[0146] The gravity compensation module is used to perform the first gravity compensation based on the total gravity and center of mass coordinates of the sensor and actuator.
[0147] The sampling interval division module is used to represent the workspace of the robot deburring process using the RPY angle. The workspace is divided into 4 sampling intervals with the constraint that the robot flange joint does not touch the extreme value of the joint angle during continuous movement.
[0148] The attitude calculation module is used to obtain the input point set using the Latin hypercube sampling method, calculate the attitude of each point relative to the robot's base coordinate system based on the RPY angle, and collect the systematic error Δc of gravity compensation when the robot moves to each point.
[0149] The prediction model training module is used to train a gravity compensation system error prediction model using a long short-term memory network deep learning algorithm.
[0150] The systematic error compensation module is used to compensate for systematic errors based on the first gravity compensation, according to the gravity compensation systematic error prediction model, to obtain high-precision gravity compensation results.
[0151] like Figure 3 As shown in the figure, the six-dimensional force sensor gravity compensation method for robot deburring based on long short-term memory network provided in this embodiment of the invention mainly includes the following steps:
[0152] Step 1: Plan the six poses of the sensor and actuator where the gravity acts only in the positive and negative directions of each coordinate axis of the sensor coordinate system.
[0153] A schematic diagram of the Euler angles of the sensor coordinate system is shown below. Figure 4 As shown, the corresponding rotation matrix is obtained based on the planned Euler angles, and the sensor coordinate system rotation matrix is obtained. for:
[0154]
[0155] in The rotation matrix of the sensor coordinate system relative to the robot base coordinate system is obtained based on Euler angles. It is a rotation matrix that rotates the z-axis by α. It is a rotation matrix about the y-axis by rotation β. It is a rotation matrix that rotates γ around the x-axis.
[0156] Based on the orientation planned using Euler angles, the robot searches for reachable, interference-free position coordinates within its workspace after installing six-dimensional force sensors and actuators.
[0157] Step 2: Based on the pose in the sensor coordinate system, calculate the rotation angles of the robot's six joints using robot inverse kinematics, control the robot to move to the corresponding pose, and record the sensor readings.
[0158] Based on the rotation matrix and position coordinates of each planned pose, the rotation angles of the six joint axes when the robot moves to each pose can be calculated using robot inverse kinematics:
[0159]
[0160] in, It is the transformation matrix between the robot's joint axis coordinate systems, θ n+1 These are the rotation angles of the robot's joint axes. It is the transformation matrix of the sensor coordinate system relative to the robot's 6th axis coordinate system.
[0161] The reading of the six-dimensional force sensor in the first pose 1 is (f x1 ,f y1 ,f z1 ,t x1 ,t y1 ,t z1 The other five poses, pose2, pose3, pose4, pose5, and pose6, follow the same pattern.
[0162] Step 3: Based on the readings in the 6 poses, use statics to calculate the reference value of the sensor when it is not subjected to external force, and calculate the total weight of the sensor and actuator and the centroid coordinates in the sensor coordinate system based on the sensor reference value.
[0163] Sensor reference value (F) x0 ,F y0 ,F z0 ,T x0 ,T y0 ,T z0 )for:
[0164]
[0165]
[0166]
[0167] Among them (F) x0 ,F y0 ,F z0 ,T x0 ,Ty0 ,T z0 () is the reference value of the sensor when it is not subject to its own gravity or other external forces.
[0168] Total gravity G a and the coordinates of the total centroid {C x C y C z}for:
[0169]
[0170]
[0171]
[0172]
[0173] Among them G a It is the total gravity of the six-dimensional force sensor and the end effector, {C x C y C z} represents the coordinates of the global centroid.
[0174] Step 4: Perform the first gravity compensation based on the total weight and center of mass coordinates of the sensor and actuator.
[0175] The components of total gravity in each coordinate system of the sensor coordinate system (G) x G y G z ) and component torque are
[0176] G x =-G a ·cos(z b ,x c M x =G z ·C y -G y ·C z
[0177] G y =-G a ·cos(z b ,y c M y =G x ·C z -G z ·C x
[0178] G z =-G a ·cos(z b ,z c Mz =G y ·C x -G x ·C y
[0179] Where cos(z) b ,x c ), cos(z) b ,y c ), cos(z) b ,z c ) is the cosine of the angle between the z-axis of the robot's base coordinate system and the three coordinate axes of the sensor coordinate system.
[0180] The result of the first gravity compensation (R) Fx ,R Fy ,R Fz ,R Tx ,R Ty ,R Tz )for
[0181] R Fx =F x -F x0 -G x
[0182] R Fy =F y -F y0 -G y
[0183] R Fz =F z -F z0 -G z
[0184] R Tx =T x -T x0 -M x
[0185] R Ty =T y -T y0 -M y
[0186] R Tz =T z -T z0 -M z
[0187] Step 5: Use the RPY angle to represent the workspace of the robot deburring process. With the constraint that the robot flange joint does not touch the extreme value of the joint angle during continuous movement, divide the workspace into 4 sampling intervals.
[0188] like Figure 5 As shown, in the robot's deburring operation, the rotation of the sensor coordinate system in the x-axis and y-axis directions will not exceed 30°. Therefore, the attitude workspace represented by the RPY angle is:
[0189] R(z,±180°)·R(y,±30°)·R(x,±30°)
[0190] To ensure that the robot's flange joint axis does not exceed the 360° joint limit when continuously collecting gravity error data within the deburring workspace, the deburring workspace is divided into four 90° acquisition intervals based on the z-axis rotation range of the sensor coordinate system. Figure 2 α z It is the rotation angle around the z-axis of the sensor coordinate system in the RPY angle representation.
[0191] Step 6: Use the Latin hypercube sampling method to obtain the input point set, calculate the attitude of each point relative to the robot's base coordinate system based on the RPY angle, and collect the systematic error Δc of gravity compensation when the robot moves to each point.
[0192] Due to the combined gravity of the sensor and actuators acting on the sensor strain gauge, the sensor reference value will fluctuate slightly under different postures. Therefore, even after initial gravity compensation, the compensation result still has systematic errors.
[0193] The systematic error Δc of the first gravity compensation is:
[0194] Δc=Δb+Δg
[0195] Where Δb is the sensor reference value error caused by the anisotropy of the sensor reference value, and Δg is the total gravity calculation error caused by the sensor measurement accuracy.
[0196] Latin hypercube sampling was used to generate 2500 sampling points in each of the four sampling intervals.
[0197] Within each sampling interval, the robot is continuously moved to each sampling point, and the sensor readings are recorded after the first gravity compensation when the sensor is not subjected to external force. This reading is the systematic error Δc of the sensor gravity compensation system under the corresponding posture.
[0198] Step 7: Use a long short-term memory network deep learning algorithm to train a gravity compensation system error prediction model.
[0199] A Long Short-Term Memory (LSTM) network was used to train a deep learning model predicting systematic errors in gravity compensation. A dataset of 10,000 {attitude, systematic compensation error} samples obtained across four sampling intervals was used as input and output to train the LSM network. The input was 3D sensor attitude, and the output was the predicted 6D sensor gravity compensation systematic error. ReLU was used as the activation function. The mean squared loss error (MSELoss) was used as the loss function. A variable learning rate was adopted, with an initial learning rate of 0.01; after 50,000 training rounds, it became 0.001; after 200,000 rounds, it became 0.00001, and after a total of 300,000 rounds of training, a gravity compensation systematic error prediction model was obtained.
[0200] Step 8: Based on the gravity compensation systematic error prediction model, compensate for the systematic error on the basis of the first gravity compensation to obtain a high-precision gravity compensation result.
[0201] like Figure 6 As shown, the force value R after compensation using the gravity compensation systematic error prediction model is... end for:
[0202] R end =R F -f({r x ,r y ,r z})
[0203] Where R F This is the result of the first gravity compensation. f is the gravity compensation systematic error prediction model, whose input {r x ,r y ,r z} represents the 3D attitude of the sensor, and its output f({r x ,r y ,r z}) represents the 6-dimensional prediction error.
[0204] An application embodiment of the present invention provides a computer device, which includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor performs the steps of a six-dimensional force sensor gravity compensation method for robot processing.
[0205] An application embodiment of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of a six-dimensional force sensor gravity compensation method for robot processing.
[0206] An application embodiment of the present invention provides an information data processing terminal, which is used to realize a six-dimensional force sensor gravity compensation system for robot processing.
[0207] Example 1: Industrial Assembly Line Robot
[0208] In an industrial assembly line environment, robots need to assemble fasteners at multiple fixed locations. To increase accuracy and reduce errors, a six-dimensional force sensor is used to sense forces and torques in the environment.
[0209] 1. Plan six orientations for the sensor and actuators where gravity acts only in the positive and negative directions of each coordinate axis of the sensor coordinate system.
[0210] 2. Calculate the rotation angle at each position using the robot's inverse kinematics, control the robot to move to these positions, and record the sensor readings.
[0211] 3. Use statics to calculate the reference value of the sensor when no external force is applied, and calculate the total weight and center of mass coordinates of the sensor and actuator.
[0212] 4. Perform preliminary gravity compensation based on the total weight and the coordinates of the center of mass.
[0213] 5. Divide the robot's workspace into four sampling intervals and use the Latin hypercube sampling method to obtain the input point set.
[0214] 6. Use the Long Short-Term Memory (LSTM) deep learning algorithm to train a gravity-compensated system error prediction model.
[0215] 7. Based on the initial gravity compensation, a prediction model is used to further compensate for system errors in order to obtain high-precision gravity compensation results.
[0216] Example 2: Medical Surgical Robot
[0217] In a medical surgical environment, surgical robots need to perform precise operations at specific positions and angles. To improve the accuracy and safety of the surgery, six-dimensional force sensors can also be used for gravity compensation.
[0218] 1. Plan six orientations for the sensor and actuators where gravity acts only in the positive and negative directions of each coordinate axis of the sensor coordinate system.
[0219] 2. Calculate the rotation angle of each surgical position using the robot's inverse kinematics, control the robot to move to these positions, and record the sensor readings.
[0220] 3. Use statics to calculate the reference value of the sensor when no external force is applied, and calculate the total weight and center of mass coordinates of the sensor and actuator.
[0221] 4. Perform preliminary gravity compensation based on the total weight and the coordinates of the center of mass.
[0222] 5. The surgical space of the robot is divided into four sampling intervals, and the input point set is obtained by using the Latin hypercube sampling method.
[0223] 6. Use the Long Short-Term Memory (LSTM) deep learning algorithm to train a gravity-compensated system error prediction model.
[0224] 7. Based on the initial gravity compensation, a prediction model is used to further compensate for system errors in order to obtain high-precision gravity compensation results.
[0225] Both embodiments use the same technical solution, but can achieve different effects in different application scenarios. In industrial assembly lines, it can improve assembly accuracy and efficiency; in medical surgery, it can improve surgical accuracy and safety.
[0226] It should be noted that embodiments of the present invention can be implemented in hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuitry such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of the above-described hardware circuitry and software, such as firmware.
[0227] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method of robotically machined six-axis force sensor gravity compensation, the method comprising: By combining statics calculation and deep learning, the system first uses statics to obtain the sensor's baseline values and centroid coordinates for preliminary gravity compensation. Then, it divides the robot's workspace into sampling intervals to collect systematic errors. Finally, it uses a long short-term memory network deep learning algorithm to predict and compensate for these systematic errors. include: S1, planning six postures in which the gravity of the sensor and actuator acts only in the positive and negative directions of each coordinate axis of the sensor coordinate system; S2. Based on the pose of the sensor coordinate system, the rotation angles of the robot's six joints are calculated using robot inverse kinematics. The robot is then controlled to move to the corresponding pose, and the sensor readings are recorded. S3, based on the readings under 6 poses, uses statics to calculate the reference value of the sensor when it is not subjected to external force, and calculates the total weight of the sensor and actuator and the centroid coordinates in the sensor coordinate system based on the sensor reference value; S4, perform the first gravity compensation based on the total weight and center of mass coordinates of the sensor and actuator; S5, using the RPY angle to represent the workspace of the robot deburring process, with the constraint that the robot flange joint does not touch the extreme value of the joint angle during continuous movement, the workspace is divided into 4 sampling intervals. S6, using Latin hypercube sampling method to obtain the input point set, according to the RPY angle to calculate the attitude of each point relative to the robot base coordinate system, and collect the systematic error of gravity compensation when the robot moves to each point ; S7 uses a long short-term memory network deep learning algorithm to train a gravity compensation system error prediction model; S8, based on the gravity compensation systematic error prediction model, compensates for the systematic error on the basis of the first gravity compensation, and obtains a high-precision gravity compensation result.
2. The gravity compensation method for a six-dimensional force sensor in robot processing as described in claim 1, characterized in that, S1 includes: Obtain the corresponding rotation matrix based on the planned Euler angles, and the rotation matrix of the sensor coordinate system. for: ; in The rotation matrix of the sensor coordinate system s relative to the robot base coordinate system b is obtained based on Euler angles. It is a rotation about the z-axis The corresponding rotation matrix, It is a rotation about the y-axis The corresponding rotation matrix, It is a rotation about the x-axis The corresponding rotation matrix; based on the orientation planned by Euler angles, find reachable, interference-free position coordinates within the robot's workspace after installing six-dimensional force sensors and actuators.
3. The gravity compensation method for a six-dimensional force sensor in robot processing as described in claim 1, characterized in that, S2 includes: based on the rotation matrix and position coordinates of each planned pose, the rotation angles of the six joint axes when the robot moves to each pose can be calculated using the robot's inverse kinematics. ; in, It is the transformation matrix between the robot's joint axis coordinate systems. These are the rotation angles of the robot's joint axes. It is the transformation matrix of the sensor coordinate system s relative to the robot's 6th axis coordinate system; The reading of the six-dimensional force sensor in the first pose 1 is: ,in These are the readings of the six-dimensional force sensor in the corresponding dimension and posture. The other five postures, pose2, pose3, pose4, pose5, and pose6, follow the same pattern.
4. The gravity compensation method for a six-dimensional force sensor in robot processing as described in claim 1, characterized in that, S3 includes: sensor reference value for: ; in It is the reference value of the sensor when it is not subject to its own gravity or other external forces; Total gravity Sum of the total centroid coordinates for: ; ; in It is the total gravity of the six-dimensional force sensor and the end effector. These are the coordinates of the global centroid.
5. The gravity compensation method for a six-dimensional force sensor in robot machining as described in claim 1, characterized in that, S4 includes: the components of the total gravity in each coordinate system of the sensor coordinate system. The sum of the torque components is ; in It is the cosine of the angle between the z-axis of the robot's base coordinate system and the three coordinate axes of the sensor coordinate system; The result of the first gravity compensation for: ; in, It is the force measurement value after the first gravity compensation is completed in the corresponding dimension.
6. The gravity compensation method for a six-dimensional force sensor in robot machining as described in claim 1, characterized in that, S5 includes: In robot deburring, the rotation of the sensor coordinate system along the x and y axes will not exceed 30°. Therefore, the attitude workspace, represented by the RPY angle, is: ; To ensure that the robot's flange joint axis does not exceed the gravity compensation error dataset when continuously collecting data within the deburring work area, The joint limit value is used to divide the deburring workspace into four parts according to the z-axis rotation range of the sensor coordinate system. The collection range, in which It is the rotation angle around the z-axis of the sensor coordinate system in the RPY angle representation.
7. The gravity compensation method for a six-dimensional force sensor in robot processing as described in claim 1, characterized in that, S6 include: Due to the combined gravity of the sensor and actuator acting on the sensor strain gauge, the sensor reference value will fluctuate slightly under different postures. Therefore, after the first gravity compensation, the compensation result still has systematic errors. Systematic error of the first gravity compensation for: ; in The error in the sensor reference value is caused by the anisotropy of the sensor reference value. The error in calculating the total gravity of the sensor and end effector is caused by the sensor's measurement accuracy. Latin hypercube sampling was used to generate 2500 sampling points in each of the four sampling intervals; Within each sampling interval, the robot is continuously moved to each sampling point, and the sensor readings are recorded after the first gravity compensation when no external force is applied. This reading represents the systematic error of the sensor's gravity compensation under the corresponding attitude. .
8. The gravity compensation method for a six-dimensional force sensor in robot processing as described in claim 1, characterized in that, S7 includes: a deep learning algorithm that uses a Long Short-Term Memory network as the training method for predicting systematic errors in gravity compensation, as detailed below: The Long Short-Term Memory (LSTM) network was trained using a dataset of 10,000 {attitude, gravity compensation systematic errors} obtained across four sampling intervals as input and output pairs. The input was the 3D sensor attitude, and the output was the predicted 6D sensor gravity compensation systematic errors. ReLU was used as the activation function. The mean squared loss error (MSELoss) was used as the loss function; a variable learning rate was adopted, with an initial learning rate of 0.01; after 50,000 training rounds, it became 0.001; after 200,000 rounds, it became 0.00001, and after a total of 300,000 rounds of training, a gravity compensation systematic error prediction model was obtained. S8 includes: the force value after compensation using a systematic error prediction model. for: ; in This is the result of the first gravity compensation. , It is a gravity compensation systematic error prediction model, and its input is... It is the sensor's 3D attitude, and its output It is a 6-dimensional prediction error.
9. A six-dimensional force sensor gravity compensation system for robot machining, implementing the six-dimensional force sensor gravity compensation method for robot machining as described in any one of claims 1 to 8, characterized in that, include: The gravity planning module is used to plan six orientations for the sensor and actuators where gravity acts only in the positive and negative directions of each coordinate axis of the sensor coordinate system. The pose translation module is used to calculate the rotation angles of the robot's six joints using robot inverse kinematics based on the pose in the sensor coordinate system, control the robot to move to the corresponding pose, and record the sensor readings. The centroid coordinate calculation module is used to calculate the reference value of the sensor when it is not subjected to external force based on the readings under 6 poses, and to calculate the total weight of the sensor and actuator and the centroid coordinates in the sensor coordinate system based on the sensor reference value. The gravity compensation module is used to perform the first gravity compensation based on the total gravity and center of mass coordinates of the sensor and actuator. The sampling interval division module is used to represent the workspace of the robot deburring process using the RPY angle. The workspace is divided into 4 sampling intervals with the constraint that the robot flange joint does not touch the extreme value of the joint angle during continuous movement. The attitude calculation module uses the Latin hypercube sampling method to obtain the input point set, calculates the attitude of each point relative to the robot's base coordinate system based on the RPY angle, and collects the systematic error of gravity compensation when the robot moves to each point. ; The prediction model training module is used to train a gravity compensation system error prediction model using a long short-term memory network deep learning algorithm. The systematic error compensation module is used to compensate for systematic errors based on the first gravity compensation, according to the gravity compensation systematic error prediction model, to obtain high-precision gravity compensation results.