A trajectory pre-screening-based robot arm load gravity identification method and device
Patent Information
- Application Number
- CN202611148619.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-07-30
AI Technical Summary
[0003]当前主流辨识技术主要采用固定激励轨迹法或随机轨迹法:固定激励轨迹法未评估轨迹对重力辨识的适用性,盲目运行轨迹可能导致数据无效;随机轨迹法缺乏系统化的数据预处理机制,采集数据信噪比低,两者均存在辨识效率低下的问题
[0021]本申请提供的基于轨迹预筛选的机械臂负载重力辨识方法和装置,第一方面,通过运动范围筛选与重力夹角筛选的双重机制,实现辨识轴的精准定位:运动范围筛选确保所选关节在轨迹运行中具有足够的位移激励,避免因运动区间过小导致数据冗余,为负载重力参数辨识提供丰富多样的数据样本;重力夹角筛选则聚焦于关节旋转轴与重力方向的几何关系,筛选出受重力影响最显著的轴,增强重力信号在动力学模型中的响应强度。取两者的公共部分作为公共辨识轴,既保证了关节运动对负载的激励强度,又确保了重力分量在力矩数据中的有效投影,使后续参数辨识过程更聚焦于有效信息。这种双重约束机制显著提升了辨识轴的质量,减少无效轴的干扰,避免单一条件筛选可能导致的运动激励充足但重力响应微弱或重力敏感但运动范围不足等问题,从源头提升参数解的唯一性和精度。第二方面,通过先筛选轨迹再运行的策略,从源头提升数据质量并简化工程流程:传统方法需多次试错运行以获取合格数据,而预筛选通过理论计算提前剔除无法满足辨识条件的轨迹,减少机械臂的无效动作,降低硬件损耗和时间成本。预筛选后的轨迹能确保采集的关节数据中有效信号占比更高,减少后续数据预处理的复杂度(如无需剔除大量噪声数据)。同时,通过条件数调整轨迹,可优化辨识矩阵的病态程度,使最小二乘法求解更稳定。此外,集成化轨迹设计将规划、筛选、调整集成在预筛选阶段,无需分段运行不同轨迹,既简化了机械臂控制逻辑,又保证了数据采集的一致性,避免多段轨迹拼接导致的动力学模型不连续问题。
Smart Images

Figure CN122666529B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotic arm load identification technology, and in particular to a method and apparatus for robotic arm load gravity identification based on trajectory pre-screening. Background Technology
[0002] In the field of industrial automation, the precise control of robotic arms relies heavily on the accurate identification of load gravity parameters. Significant errors in load gravity parameter identification can directly lead to deviations in robotic arm trajectory planning, increased motion jitter, and even equipment overload damage due to inaccurate torque control. For example, in precision assembly and welding scenarios, even minute errors in gravity parameters can accumulate into significant end-effector position deviations, affecting product processing accuracy. Therefore, achieving high-precision identification of load gravity parameters is a core prerequisite for ensuring the dynamic performance and operational reliability of robotic arms.
[0003] Current mainstream identification techniques mainly employ either the fixed-excitation trajectory method or the random trajectory method. The fixed-excitation trajectory method fails to evaluate the applicability of the trajectory to gravity identification, and blindly running the trajectory may lead to invalid data. The random trajectory method lacks a systematic data preprocessing mechanism, resulting in low signal-to-noise ratio of the acquired data. Both methods suffer from low identification efficiency. Joint current detection-based schemes are widely used due to their lack of additional sensors and low cost, but they face two major challenges: the coupling between the friction model and the gravity term leads to high friction estimation errors, and nonlinear friction at low speeds is difficult to model. Existing load gravity identification techniques generally suffer from four major problems: inability to predict trajectory availability in advance (leading to a high identification failure rate), lack of optimized selection of identification axes (low efficiency), low data signal-to-noise ratio (limited accuracy), and insufficient accuracy of the friction model (error accumulation).
[0004] Therefore, there is an urgent need for a method to achieve high-precision identification of the load on a robotic arm, while reducing human intervention and saving resources. Summary of the Invention
[0005] In view of this, this application provides a method and apparatus for identifying the load gravity of a robotic arm based on trajectory pre-screening, so as to achieve high-precision identification of the load gravity of the robotic arm, while reducing manual intervention and saving resources.
[0006] Specifically, this application is implemented through the following technical solution:
[0007] The first aspect of this application provides a method for identifying the load gravity of a robotic arm based on trajectory pre-screening, the method comprising:
[0008] The robot arm performs trajectory planning at multiple pose points, and the planned trajectory data is combined with the reverse sequence data to obtain the identified trajectory.
[0009] Based on the identified trajectory, the range of motion of each joint angle in the identified trajectory is calculated, and a first identification axis that satisfies the first condition is determined;
[0010] Based on the identified trajectory, the angle between the rotation axis of each joint of the robotic arm and the gravitational acceleration is calculated, and the second identified axis that satisfies the second condition is determined.
[0011] Determine the common identification axis among the first identification axis and the second identification axis, calculate the condition number based on the common identification axis, and adjust the identification trajectory based on the condition number;
[0012] The robotic arm is controlled to run based on the adjusted identification trajectory, and joint data is collected. The joint data is preprocessed to determine the target data segment and the target identification axis. The target data segment is the data in the joint data with a signal-to-noise ratio greater than a preset value, and the target identification axis is the identification axis that meets the requirements of motion excitation and load response.
[0013] Based on the target data segment and the target identification axis, the load gravity parameters are identified using the least squares method.
[0014] The second aspect of this application provides a robotic arm load gravity identification device based on trajectory pre-screening, the device comprising a combination module, a determination module, an adjustment module and an identification module;
[0015] The combined module is used to perform trajectory planning for the robotic arm at multiple pose points, and to combine the planned trajectory data with the reverse sequence data to obtain the identified trajectory.
[0016] The determining module is used to calculate the range of motion of each joint angle in the identified trajectory based on the identified trajectory, and determine the first identified axis that satisfies the first condition;
[0017] The determining module is further configured to calculate the angle between the rotation axis of each joint of the robotic arm and the gravitational acceleration based on the identified trajectory, and determine the second identified axis that satisfies the second condition;
[0018] The adjustment module is used to determine the common identification axis among the first identification axis and the second identification axis, calculate the condition number based on the common identification axis, and adjust the identification trajectory based on the condition number;
[0019] The determining module is also used to control the robotic arm to run based on the adjusted identification trajectory, collect joint data, preprocess the joint data, and determine the target data segment and the target identification axis; the target data segment is the data in the joint data with a signal-to-noise ratio greater than a preset value, and the target identification axis is the identification axis that meets the requirements of motion excitation and load response;
[0020] The identification module is used to identify the load gravity parameters based on the target data segment and the target identification axis using the least squares method.
[0021] The robotic arm load gravity identification method and apparatus based on trajectory pre-screening provided in this application, in the first aspect, achieves precise positioning of the identification axis through a dual mechanism of motion range screening and gravity angle screening: motion range screening ensures that the selected joint has sufficient displacement excitation during trajectory operation, avoiding data redundancy due to excessively small motion range, and providing rich and diverse data samples for load gravity parameter identification; gravity angle screening focuses on the geometric relationship between the joint rotation axis and the gravity direction, screening out the axis most significantly affected by gravity, enhancing the response intensity of the gravity signal in the dynamic model. Taking the common part of the two as the common identification axis ensures both the excitation intensity of joint motion on the load and the effective projection of gravity components into the torque data, making the subsequent parameter identification process more focused on effective information. This dual constraint mechanism significantly improves the quality of the identification axis, reduces the interference of invalid axes, and avoids problems such as sufficient motion excitation but weak gravity response or gravity sensitivity but insufficient motion range that may be caused by single-condition screening, thereby improving the uniqueness and accuracy of parameter solutions from the source. Secondly, by employing a strategy of pre-screening trajectories before execution, data quality is improved from the source, and the engineering process is simplified. Traditional methods require multiple trial-and-error runs to obtain qualified data, while pre-screening theoretically eliminates trajectories that fail to meet the identification conditions, reducing invalid movements of the robotic arm and lowering hardware wear and time costs. Pre-screened trajectories ensure a higher proportion of valid signals in the collected joint data, reducing the complexity of subsequent data preprocessing (e.g., eliminating the need to remove large amounts of noisy data). Simultaneously, adjusting the trajectory using condition numbers optimizes the ill-conditioned nature of the identification matrix, making the least squares solution more stable. Furthermore, integrated trajectory design integrates planning, screening, and adjustment into the pre-screening stage, eliminating the need to run different trajectories in segments. This simplifies the robotic arm control logic, ensures data acquisition consistency, and avoids the discontinuity problem in the dynamic model caused by splicing multiple trajectory segments. Attached Figure Description
[0022] Figure 1 A flowchart of the robotic arm load gravity identification method based on trajectory pre-screening provided in Embodiment 1 of this application;
[0023] Figure 2 This is a schematic diagram of the structure of the robotic arm load gravity identification device based on trajectory pre-screening provided in Embodiment 2 of this application. Detailed Implementation
[0024] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application.
[0025] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used herein are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0026] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0027] The following specific embodiments are given to illustrate the technical solution of this application in detail.
[0028] Figure 1 The flowchart illustrates the robotic arm load gravity identification method based on trajectory pre-screening provided in Embodiment 1 of this application. Please refer to... Figure 1 The method provided in this embodiment may include:
[0029] S101. Perform trajectory planning for the robotic arm at multiple pose points, and combine the planned trajectory data with the reverse sequence data to obtain the identified trajectory.
[0030] Specifically, the number of pose points is set according to actual needs. For example, in one embodiment, there are three pose points. It should be noted that three pose points can form a nonlinear trajectory, covering different areas of the robotic arm's workspace, ensuring sufficient excitation of each joint at different angles; the amount of trajectory data formed by three pose points is moderate, which can meet the degree of freedom requirements for solving the dynamic equations (at least three independent equations) while avoiding data redundancy that increases the computational burden. Furthermore, when selecting pose points, the selected pose points should ensure that the motion range of each joint angle covers 20% to 80% of its working range as much as possible, avoiding concentration at extreme positions that could lead to data distortion; the pose point settings should ensure that the angle between the rotation axis of each joint and the gravitational acceleration is evenly distributed, ensuring that the torque contribution of the gravity term on different joints is identifiable; the trajectory planning between pose points should meet the kinematic constraints of the robotic arm (such as velocity and acceleration limits) to avoid measurement noise caused by abrupt changes.
[0031] Furthermore, reverse-order data is obtained by reversing the pose point order of the original trajectory data (e.g., if the original trajectory data is A→B→C, the reverse-order data is C→B→A), and combining it with the original trajectory data to form a round-trip trajectory. Trajectory identification is a combination of trajectory data and reverse-order data. Trajectory data is the forward motion data from the first pose point to the last pose point, while reverse-order data is the reverse motion data from the last pose point to the first pose point. Trajectory identification involves concatenating or synchronously pairing the two sets of data according to a time sequence to form a complete "forward-reverse" dataset.
[0032] In specific implementation, the trajectory planning for the robotic arm at multiple pose points, and the combination of the planned trajectory data with reverse-order data to obtain the identified trajectory, includes: selecting multiple different pose points within the robotic arm's workspace, generating trajectory curves in joint space based on Cartesian space poses through inverse kinematics; the trajectory curves satisfying the smoothness constraints of the robotic arm's joint velocities and accelerations; arranging the trajectory curves in reverse order along the time axis to generate reverse-order trajectory data opposite to the original trajectory direction; splicing the trajectory curves and the reverse-order trajectory data in chronological order to obtain the identified trajectory; and the robotic arm moving at the same joint angles of the identified trajectory with velocities of equal magnitude and opposite directions.
[0033] Specifically, multiple different pose points are manually selected within the robotic arm's workspace, covering the main motion area of the robotic arm. Each Cartesian space pose is converted into a joint space angle sequence using an inverse kinematics algorithm, generating an initial trajectory curve. A fifth-order polynomial interpolation or trapezoidal velocity planning algorithm is used to smooth the joint angle sequence, ensuring that joint velocities and accelerations are continuous and do not exceed the physical limitations of the robotic arm, avoiding noise caused by sudden motion changes. Further, the generated joint space trajectory curves (containing timestamps, joint angles, velocities, etc.) are sorted from largest to smallest timestamp to obtain reverse trajectory data. The velocity values in the reverse trajectory data are inverted to ensure that the robotic arm's velocity magnitude remains constant and its direction is reversed during reverse motion. The original trajectory curve and the reverse trajectory data are concatenated in chronological order to form a complete identification trajectory of "forward motion—reverse motion". For example, if the original trajectory is A→B→C and the reverse trajectory is C→B→A, the concatenated trajectory is A→B→C→B→A. For details on the implementation process and principles of trajectory planning, please refer to the descriptions in relevant technologies; they will not be repeated here.
[0034] The method provided in this embodiment effectively eliminates the interference of friction on the identification of the robot arm's dynamic parameters by selecting multiple pose points in the robot arm's workspace and generating trajectory curves that satisfy the smoothness constraints of velocity and acceleration. These trajectories are then arranged in reverse order and spliced with the original trajectory to form an identification trajectory. Specifically, the smooth trajectory curves reduce the transitional fluctuations between static and dynamic friction caused by sudden velocity changes during robot arm movement, thus reducing the nonlinear influence of friction. The splicing of the reversed trajectory with the original trajectory allows the robot arm to move at the same joint angle with equal magnitude but opposite directions of velocity. Utilizing the characteristic that friction changes in opposite directions with velocity (i.e., velocity odd symmetry), the friction during forward and reverse motion cancels each other out. In this way, the interference of friction in the identification trajectory is directly eliminated by the physical mechanism, without relying on complex friction model compensation. This results in more accurate identification of parameters such as inertia and gravity terms in the dynamic equations, significantly improving the accuracy and robustness of the robot arm's dynamic parameter identification. Especially in industrial applications, it effectively improves the positioning accuracy of the robot arm's end effector and the stability of force control tasks.
[0035] S102. Based on the identified trajectory, calculate the range of motion of each joint angle in the identified trajectory, and determine the first identified axis that satisfies the first condition.
[0036] Specifically, the first identification axis refers to the joint axis that meets specific motion conditions by analyzing the range of motion of each joint angle in the identification trajectory during the identification process of the robotic arm's dynamic parameters. The role of the first identification axis is to prioritize joints with a large range of motion and diverse force states for parameter identification, thereby improving the accuracy and reliability of the identification results.
[0037] It should be noted that the selection of the first identification axis must further ensure that the joint can effectively excite its dynamic characteristics during movement. For example, if a joint has a small range of motion, even if the friction is canceled out, the changes in its inertial force and gravity will be small, which may lead to insufficient accuracy in parameter identification. The first identification axis must also meet the range of motion condition to ensure that the remaining dynamic terms (such as inertia and gravity) can be accurately calculated after eliminating friction interference.
[0038] In specific implementation, the step of calculating the range of motion of each joint angle in the identification trajectory and determining the first identification axis that satisfies the first condition based on the identification trajectory includes: for the identification trajectory, determining all joint angle data of each joint of the robotic arm in the identification trajectory; for each joint, obtaining the maximum and minimum values of the joint angles of the joint; calculating the difference between the maximum and minimum values to obtain the angular range of motion of the joint; comparing the angular range of motion with a first preset threshold, and when the angular range of motion is greater than the first preset threshold, determining that the joint satisfies the first condition and determining the joint as the first identification axis.
[0039] Specifically, based on the generated identification trajectory, the joint angle data in the identification trajectory are classified according to joint numbers (e.g., joint 1, joint 2, ..., joint n). All angle values of each joint throughout the entire trajectory cycle are extracted to form an independent joint angle sequence. For each joint angle sequence, the maximum and minimum values are identified by iterating through the angle values of all sampling points. For example, if the angle sequence of joint 1 is [20°, 35°, 18°, 40°], then the maximum value is 40° and the minimum value is 18°. The maximum and minimum values of each joint angle sequence are subtracted to obtain the angular motion range. For example, the angular motion range of joint 1 is 22°. The angular motion range of each joint is compared with a pre-set first preset threshold (e.g., 30°, which can be adjusted according to the characteristics of the robotic arm joints). If the angular motion range of a joint is greater than the first preset threshold, it indicates that its motion range is large enough to produce a significant dynamic effect (e.g., inertial force, gravitational change) in the identification trajectory, satisfying the first condition. Then, this joint is marked as the first identification axis. If the angular range of motion of a joint is less than the first preset threshold, it will not be included in the priority identification range.
[0040] S103. Based on the identified trajectory, calculate the angle between the rotation axis of each joint of the robotic arm and the gravitational acceleration, and determine the second identified axis that satisfies the second condition.
[0041] Specifically, the angle between the rotation axis of each joint of the robotic arm and the gravitational acceleration refers to the angle between the direction vector of the rotation axis of a certain joint and the direction vector of gravitational acceleration. The direction of gravitational acceleration is vertically downward, and the direction of the joint's rotation axis determines the size of the angle. It should be noted that in the robotic arm's dynamics model, the gravity term is one of the key parameters. Calculating the angle can determine the strength of the influence of gravity on each joint, which facilitates the separation of gravity parameters from other parameters such as inertia and friction during identification. If the angle between a joint and gravity varies greatly in the trajectory, its gravitational torque changes significantly, providing richer data features for parameter identification (for example, the difference in gravitational torque of a joint in different poses can directly reflect its mass distribution parameter).
[0042] Furthermore, joint axes that satisfy the second condition are identified as the second identification axis. The core characteristic of the second identification axis is that it is significantly affected by gravity in the identification trajectory, with obvious changes in gravitational torque. The dynamic parameters of such joints (such as joint inertia and link mass) are more strongly coupled with the gravity term, and prioritizing their identification can improve the overall accuracy of parameter calculation. Combining the above description, the first identification axis focuses on the range of motion to ensure that the joint covers sufficient pose states in the trajectory; the second identification axis focuses on the influence of gravity to ensure that the gravity term in joint dynamics can be effectively excited. Together, they guarantee the comprehensiveness of parameter identification.
[0043] In specific implementation, the step of calculating the angle between the rotation axis of each joint of the robotic arm and the gravitational acceleration based on the identified trajectory, and determining the second identification axis that satisfies the second condition, includes: obtaining the gravitational acceleration vector in the base coordinate system of the robotic arm through the gravimeter of the base; transforming the gravitational acceleration vector to the coordinate system of each joint based on the rotation matrix from the base coordinate system of the robotic arm to the coordinate system of each joint, to obtain the gravity vector in the coordinate system of each joint; for each joint, obtaining the direction vector of the joint rotation axis in the current coordinate system, and calculating the angle between the direction vector and the gravity vector in the joint coordinate system through dot product operation; comparing the angle with a second preset threshold, and determining that the joint satisfies the second condition when the angle is greater than the second preset threshold, and determining the joint as the second identification axis.
[0044] Specifically, a triaxial accelerometer is rigidly fixed to the base of the robotic arm, ensuring that the sensor coordinate system is perfectly aligned with the robotic arm's base coordinate system (typically defined as the Z-axis perpendicularly upward). Before starting the robotic arm, a static calibration (e.g., placing the robotic arm on a horizontal surface) is performed to obtain the sensor's zero-bias value, eliminating installation errors. During the robotic arm's trajectory recognition, accelerometer data is acquired at a fixed frequency to obtain a three-dimensional vector representation of gravitational acceleration in the base coordinate system (e.g., when the robotic arm is stationary, the vector might be [0, 0, -9.81] m / s²). Further, a local coordinate system is defined for each joint in the trajectory recognition, and the origin and axis are determined using the Denavit-Hartenberg (DH) parametric method. Using the robotic arm's kinematic model, the rotation matrix (containing rotation and translation information) from the base coordinate system to each joint's coordinate system is calculated. For each joint, the gravity vector in the base coordinate system is multiplied by the rotation matrix and rotated into the joint's local coordinate system using its corresponding rotation matrix. For example, if joint 1 rotates around the Z-axis, the gravity vector is transformed from the base coordinate system to the joint 1 coordinate system using a rotation matrix, obtaining the gravity direction from the perspective of joint 1. This process is repeated to generate gravity vectors in the respective coordinate systems of all joints. In the local coordinate system of each joint, the rotation axis direction is usually the Z-axis direction (for example, the rotation axis direction of joint 1 can be represented as [0, 0, 1]). The gravity vector in the joint coordinate system is normalized and adjusted to a vector of length 1, retaining only the direction information. The angle between the joint rotation axis direction and the gravity vector is calculated using the vector dot product method. A second preset threshold (e.g., 45°) is pre-set. For each joint, the calculated angle is compared with the second preset threshold: if the angle is greater than the second preset threshold (e.g., 60° > 45°), it means that the joint axis is nearly perpendicular to the gravity direction, and the joint satisfies the second condition; if the angle is less than the second preset threshold (e.g., 30° < 45°), the joint does not satisfy the condition. All joints that satisfy the condition are marked as the second identification axis. For details on the specific implementation process and principles of determining the rotation matrix, please refer to the descriptions in relevant technologies; they will not be repeated here.
[0045] For example, in one embodiment, the gravity vector obtained based on the gravitational acceleration vector can be expressed as:
[0046] ;
[0047] Among them, the The gravity vector; For rotation matrix; the This is the vector of gravitational acceleration.
[0048] The angle between the direction vector and the gravity vector in the joint coordinate system can be expressed as:
[0049] ;
[0050] Among them, the The angle between the direction vector and the gravity vector in the joint coordinate system; The gravity vector; It is the direction vector.
[0051] The method provided in this embodiment effectively optimizes the identification of dynamic parameters by calculating the angle between the joint rotation axis and the gravitational acceleration and selecting joints with an angle greater than a second preset threshold as the second identification axis. Specifically, when the joint axis is nearly parallel to the gravitational direction, the torque generated by gravity on the joint approaches zero, making the joint movement mainly dominated by inertial and frictional forces. This reduces the coupling interference between the gravity term and other parameters, improving the identification accuracy of inertial parameters (such as moment of inertia). Simultaneously, by directly utilizing accelerometer measurement data and setting geometric threshold conditions, the influence of attitude measurement noise and load changes can be reduced, enhancing the robustness of parameter estimation. Furthermore, this method complements the first identification axis (selecting joints with a large range of motion), ensuring that all parameters of the dynamic model are effectively identified, simplifying trajectory design, reducing the number of parameters that need to be processed simultaneously, and accelerating the convergence of the optimization algorithm. In industrial applications, this automated selection strategy can significantly improve the calibration efficiency and force control accuracy of robotic arms, achieving high-precision dynamic modeling and control.
[0052] S104. Determine the common identification axis among the first identification axis and the second identification axis, calculate the condition number based on the common identification axis, and adjust the identification trajectory based on the condition number.
[0053] Specifically, the common identification axis refers to the joint axis that simultaneously belongs to both the first and second identification axes. That is, the common identification axis is the intersection of the first and second identification axes. The common identification axis simultaneously satisfies the dual characteristics of strong motion excitation and small gravitational interference, and is the core optimization object for dynamic parameter identification.
[0054] Furthermore, in the identification of load gravity parameters for a robotic arm, the condition number is used to measure the ill-conditioned nature of the dynamic model matrix (i.e., the sensitivity of the matrix to input errors). Specifically, the condition number reflects the stability of the parameter matrix in the identification equation set. The smaller the condition number, the more well-conditioned the matrix, and the stronger the robustness of parameter estimation to measurement noise and model errors; conversely, the larger the condition number, the more ill-conditioned the matrix, and the more easily the accuracy and stability of parameter identification are disturbed. By calculating the condition number of the model matrix corresponding to the common identification axis, the reliability of parameter estimation under the current identification trajectory can be evaluated, and the identification trajectory can be adjusted accordingly to reduce the condition number and improve identification accuracy.
[0055] In specific implementation, the step of calculating the condition number based on the common identification axis and adjusting the identification trajectory based on the condition number includes: constructing a coefficient matrix based on the common identification axis and the robotic arm dynamics model; the coefficient matrix is used to describe the mapping relationship between the robotic arm motion and torque; calculating the second norm of the coefficient matrix, calculating the second norm of the inverse matrix of the coefficient matrix, and determining the condition number based on the product of all second norms; comparing the condition number with a third preset threshold, and determining the identification trajectory as the final identification trajectory when the condition number is less than the third preset threshold; and re-selecting pose points to generate the identification trajectory when the condition number is not less than the third preset threshold.
[0056] Specifically, data is extracted from the common identification axis, and a coefficient matrix reflecting the relationship between the robot arm's motion and stress torque is established based on the robot arm's dynamics model (a mathematical model describing the relationship between joint motion and force). Further, the transpose of the coefficient matrix is calculated, and the transpose is multiplied by the coefficient matrix to obtain a new matrix. Eigenvalue decomposition is performed on the new matrix to determine the largest eigenvalue, and the square root of the largest eigenvalue is determined as the second norm of the coefficient matrix. The inverse matrix of the coefficient matrix is calculated, and its second norm is calculated using the same method. Further, the product of the two second norms is determined as the condition number. The calculated condition number is compared with a preset third threshold. If the condition number is less than the third threshold, it indicates that the current identified trajectory is of good quality and can be used as the final trajectory for parameter identification. If the condition number is not less than the third threshold, it indicates that the trajectory quality is poor, and the robot arm pose points need to be reselected, and the process of generating the identified trajectory and calculating the condition number needs to be repeated until the condition number meets the requirements. The specific implementation process and principles of the coefficient matrix construction can be found in related technical descriptions, and will not be elaborated here.
[0057] For example, in one embodiment, the formula for calculating the condition number can be expressed as:
[0058] ;
[0059] Among them, the For condition numbers; the It is a coefficient matrix; For matrix The norm of .
[0060] The method provided in this embodiment calculates the condition number based on a common identification axis and adjusts the identification trajectory, systematically optimizing the parameter identification process through quantitative evaluation of matrix stability. First, when constructing the coefficient matrix, the focus is on the common identification axis (joints with large motion ranges and low gravitational interference) to ensure that the coefficient matrix accurately reflects the mapping relationship between the robot arm's motion and torque, providing a reliable data foundation for parameter identification. The condition number, as a key indicator, directly measures the matrix's sensitivity to noise and errors. The smaller the condition number, the better the matrix, and the less affected the parameter estimation is by measurement errors and model simplification. When the condition number exceeds a third preset threshold, the pose point is automatically reselected to generate the trajectory. This dynamic adjustment mechanism effectively avoids singular robot arm configurations, enhances motion diversity, and makes the contributions of different parameters to torque more independent and separable, thereby improving parameter identifiability. Furthermore, this method can be coordinated with a common identification axis screening strategy to first exclude some joints with severely coupled parameters, and then optimize the trajectory to further reduce the condition number, forming a dual decoupling effect. In industrial applications, this closed-loop optimization mechanism significantly improves calibration efficiency and parameter accuracy, while enhancing the robustness of the trajectory to load changes and sensor noise, achieving efficient transformation from theoretical modeling to engineering practice.
[0061] S105. Control the robotic arm to run based on the adjusted identification trajectory, collect joint data, preprocess the joint data, and determine the target data segment and the target identification axis.
[0062] The target data segment is the data in the joint data with a signal-to-noise ratio greater than a preset value, and the target identification axis is the identification axis that meets the requirements of motion excitation and load response.
[0063] Specifically, joint data refers to the real-time physical data collected by sensors at each joint of the robotic arm during operation, reflecting the arm's motion state and force conditions. Joint data includes joint position, joint velocity, joint acceleration, and joint torque.
[0064] The target data segment is a high-quality data range selected from the original joint data, and its criterion is a signal-to-noise ratio (SNR) greater than a preset value. Specifically, the SNR measures the ratio of effective information to noise in a signal. The preset value is set based on the robot arm's precision requirements and the noise level of the industrial environment (such as sensor noise, motor interference, etc.). When the SNR of the data segment meets the standard, it means that the joint position, speed, torque, and other signals within that range can more realistically reflect the actual movement and load of the robot arm, avoiding noise interference with subsequent parameter identification.
[0065] The target identification axis is a joint axis selected from the various joints of the robotic arm that meets specific dynamic identification requirements. It must simultaneously satisfy motion excitation and load response conditions: the joint must generate sufficient motion amplitude and diversity (such as large-range angle changes and different velocity curves) in the identification trajectory to stimulate the robotic arm's dynamic characteristics (such as inertia and Coriolis force), enabling the relevant parameters to be effectively identified; the joint must be highly sensitive to load changes, meaning that when the load (such as the weight of the end effector or the mass of the grasped object) changes, the joint torque or motion state can produce a clear and measurable response, avoiding excessive coupling between parameters that leads to ambiguous identification results. For example, common identification axes preferentially select joints with large motion ranges and significant gravitational influence (such as the upper arm joint of the robotic arm), while target identification axes are further screened based on motion excitation and load response to ensure that the axis's dynamic parameters (such as moment of inertia and friction coefficient) can be independently decoupled from the joint data, improving identification efficiency and parameter separability.
[0066] In specific implementation, the preprocessing of the joint data to determine the target data segment and target identification axis includes: pairing joint data with the same velocity magnitude but opposite direction at the same joint angle; utilizing the odd symmetry of velocity due to friction, calculating the average torque of the paired data to obtain a frictionless dynamic torque signal; for the friction-processed dynamic torque signal and corresponding velocity data, based on the velocity standard deviation of a first preset number of sampling points before and after each joint point, retaining uniform velocity segments and filtering to obtain uniform velocity segment data; the uniform velocity segment data only contains gravity terms. The difference between the acceleration of the uniform speed segment and zero is less than a preset difference. Based on the uniform speed segment data and velocity data, the proportion of sampling points in each joint axis of the uniform speed segment data whose absolute velocity value is greater than a first preset value is determined. The range of torque variation of each joint axis is calculated to see if it exceeds a preset proportion of the rated torque. Based on the sampling point proportion and the preset proportion, the available identification axis is determined. The target identification axis is determined according to the number of available identification axes. For the target axis, the absolute value of the load torque of all sampling points of each target axis is calculated and sorted in descending order. The target data segment is determined based on the sorting result.
[0067] Specifically, in the joint data, two sets of data with the same velocity magnitude but opposite direction at the same joint angle are identified (e.g., corresponding sampling points with velocities of +5° / s and -5° / s). Utilizing the characteristic that frictional force changes in opposite directions with velocity (odd symmetry), the torque values of the paired data are averaged to obtain a torque signal containing only dynamic factors (such as gravity and inertial forces). For the dynamic torque signal after friction processing, the velocity standard deviation of several sampling points before and after it (e.g., the first 50 and the last 50) is calculated. If the velocity standard deviation of a certain data segment is less than a preset difference (e.g., a preset difference of 0.001 indicates that the acceleration is approaching zero and the speed is uniform), then that data segment is retained as uniform speed segment data. In the uniform speed segment data, the percentage of sampling points whose absolute velocity value of each joint axis is greater than a first preset value (e.g., 0.001 rad / s) is counted (e.g., a percentage exceeding 50% is considered valid). Calculate the torque variation range of each joint axis and determine whether it exceeds a preset proportion of the rated torque (e.g., 10% of the rated torque). Joint axes that simultaneously meet the requirements for both the percentage of velocity sampling points and the torque variation range are identified as usable identification axes. Based on the number of usable identification axes, determine the final target identification axes for parameter identification. For each target identification axis, calculate the absolute value of the load torque at all sampling points, sort them from largest to smallest, and retain the highest torque data from the first preset percentage (e.g., the first 90%) as the target data segment.
[0068] It should be noted that the joint torque of the robotic arm is affected not only by the load and gravity, but also by significant friction. Friction contains nonlinear components, particularly exhibiting the Stribeck effect at low speeds, as detailed in the following model:
[0069] ;
[0070] Among them, the The inertia matrix; The matrix represents the Coriolis force and centrifugal force; The gravity vector; The frictional torque; For joint angle; the The joint angular velocity; For joint acceleration; the This is the joint driving torque vector.
[0071] The Stribeck friction model for low speeds is as follows:
[0072] ;
[0073] Among them, the The Stribeck friction model is for the low-speed range; The basic friction term; the For temperature-dependent friction terms; the For load-related friction terms; the This represents the joint angular velocity.
[0074] ;
[0075] Among them, the The basic friction term; the The joint angular velocity; The Coulomb friction torque; The maximum static friction torque; For stribeck speed; the , , , The coefficient of viscous friction; The torque coefficient; Stribeck index; Joint angular velocity The symbol.
[0076] ;
[0077] Among them, the For temperature-dependent friction terms; the The joint angular velocity; , , The coefficient of friction is temperature-dependent; Joint temperature; This is the torque coefficient.
[0078] ;
[0079] Among them, the For load-related friction terms; the , The torque friction coefficient; the This refers to the joint torque.
[0080] In this embodiment, to reduce the interference of friction terms on identification, a round-trip alignment method is adopted, that is, for the same joint angle... Motion data with the same magnitude but opposite direction of velocity are paired. In this case, due to the odd symmetry of the friction term, the residual after adding the friction torques in the two directions will be significantly reduced (usually less than 0.2 Nm) and can be ignored.
[0081] ;
[0082] Among them, the The positive frictional torque; This is the reverse frictional torque; the This is the zero-velocity offset term.
[0083] Subsequently, the torque at this symmetrical position is averaged to obtain the dynamic (frictionless) torque signal, calculated using the following formula:
[0084] ;
[0085] Among them, the The inertia matrix; The matrix represents the Coriolis force and centrifugal force; The gravity vector; For joint angle; the The joint angular velocity; For joint acceleration; the The positive joint torque; This is the reverse joint torque.
[0086] Considering the joint acceleration during the actual movement of the robotic arm The resulting moment of inertia This can disturb the identification results, especially when acceleration measurements are inaccurate or the inertial matrix is not fully understood. This effect is particularly pronounced when errors exist. Therefore, in the data preprocessing stage, it is necessary to remove non-uniform segments with large accelerations and retain only uniform segments with accelerations close to zero. The specific screening method is as follows: For a certain point... The 50 sampling points before and after (i.e., the time interval) ) speed The standard deviation of the data is less than 0.001. For this point, let the acceleration... This eliminates the influence of the inertial term; at this point, the dynamic equation can be simplified to:
[0087] ;
[0088] Among them, the The matrix represents the Coriolis force and centrifugal force; The gravity vector; For joint angle; the The joint angular velocity; The positive joint torque; This is the reverse joint torque.
[0089] The method provided in this embodiment has two aspects. First, during the movement of the robotic arm, considering that friction can be mixed into the torque signal and mask the characteristics of gravity, the preprocessing process utilizes the symmetrical nature of frictional characteristics when the frictional force and velocity are reversed. Joint data with the same speed magnitude but opposite direction at the same joint angle are paired. Averaging the torque of the paired data accurately cancels out the interference caused by friction. For example, during forward movement, friction is a value that hinders the movement; during reverse movement, the frictional force is similar in magnitude but opposite in direction. After averaging, the friction-related torques cancel each other out, and the resulting torque signal only retains components directly related to gravity parameters, such as gravity and inertia. This step allows the gravity term to be clearly displayed from the torque signal during subsequent identification, without being mixed with complex friction terms, reducing the interference factors that the identification model needs to process and improving data purity from the source. Second, during the movement of the robotic arm, inertia (related to acceleration) and gravity act on the joints simultaneously. By calculating the standard deviation of the velocity at sampling points before and after the joint, data from uniform velocity segments with acceleration approaching zero are selected. Under uniform motion, acceleration is nearly zero, and the influence of inertial force can be ignored. At this point, only the gravity term plays a dominant role in the torque signal. This simplifies the originally complex dynamic problem of multiple coupled forces (inertial force, gravity, and friction) into a single problem dominated by gravity. In this simplified scenario, the characteristics of the gravity term are amplified. When fitting gravity parameters (such as gravity vector parameters corresponding to the mass and center of mass of various parts of the robotic arm) from the torque-joint angle relationship, the interference of inertial force no longer needs to be considered, greatly reducing the difficulty of parameter decoupling and making the identification logic clearer and more direct. Thirdly, this application considers that different joint axes are affected by gravity to varying degrees. During preprocessing, the proportion of sampling points with absolute velocity values greater than a preset value is used to screen joints with sufficient motion excitation (such as the upper arm joint, which has a large range of angle changes during movement, a high effective proportion of velocity, and the gravity term can cover various working conditions); the proportion of torque changes exceeding the preset percentage of rated torque is used to screen joints with significant gravity influence (when the upper arm joint is under load, the amplitude of gravity torque changes is large, and it is more sensitive to changes in gravity parameters). Combining these two conditions allows for the selection of usable identification axes, prioritizing the retention of joint data most valuable for gravity parameter identification. For small end-effector joints, where gravitational torque changes are small and motion excitation is insufficient, eliminating their invalid data prevents these data from affecting overall identification accuracy. This concentrates computational power on the identification of gravity parameters in key joints, improving identification efficiency and ensuring that gravity parameters are fully stimulated and accurately captured. Fourthly, for the selected target identification axis, the absolute values of the load torque at all sampling points are calculated and sorted, retaining the top-preset percentage of high-load torque data. High load torque means that gravity accounts for a large proportion of the torque composition, resulting in high signal strength. For example, when a robotic arm is under heavy load or undergoes large-angle movements, the contribution of gravitational torque is prominent; the gravity characteristics in this type of data are obvious, and even with noise or small disturbances, the gravity signal is not easily masked.Retaining this data serves two purposes: firstly, it suppresses the influence of noise, making the gravity parameter identification results more stable; secondly, it focuses on typical working conditions dominated by gravity in actual robotic arm operations (such as moving heavy objects and large-scale posture adjustments), making the identified gravity parameters more consistent with real application scenarios. Subsequently, when the robotic arm performs force control and trajectory planning, the model based on these parameters can have better generalization and operate accurately under different working conditions.
[0090] Optionally, determining the target identification axis based on the number of available identification axes includes: when the number of available identification axes is greater than a second preset number, calculating the load torque value of each available identification axis based on the dynamic torque signal and sorting them in descending order, selecting the second preset number of available identification axes with the highest load torque values as target identification axes; when the number of available identification axes is not greater than the second preset number, retaining all available axes as target identification axes.
[0091] The method provided in this embodiment balances the integrity of information and computational efficiency in gravity parameter identification by dynamically adapting the number of available identification axes. When the number of available identification axes exceeds a preset value, key joints with larger load torques are selected first, as the gravity signal is more prominent in the torque data of these joints, effectively reducing noise interference. At the same time, limiting the number of target identification axes simplifies the identification model, avoids mutual influence between parameters, and improves computational efficiency. When the number of available identification axes is insufficient, all available identification axes are retained to prevent the loss of key information, ensuring that complete gravity distribution characteristics can still be captured under light loads or special working conditions. This strategy, combined with the preprocessing steps of friction reduction and screening of uniform speed segments, can further focus on joints with significant gravity influence on the purified data, making the subsequent gravity parameter identification results more accurate. Furthermore, the number of axes can be flexibly adjusted according to the working conditions, making it suitable for heavy-load scenarios with high accuracy requirements, while also ensuring the reliability of the identification model under light loads or complex working conditions, achieving a balance between accuracy and efficiency in engineering applications.
[0092] S106. Based on the target data segment and the target identification axis, the load gravity parameters are identified using the least squares method.
[0093] Specifically, load gravity parameters describe the physical characteristics of the load under the influence of gravity, reflecting the mechanical characteristics exhibited by the load in a gravitational field. Load gravity parameters include load mass and center of mass position parameters. Load mass refers to the total amount of matter within the load itself, directly affecting the magnitude of gravity. The center of mass position parameter determines the coordinate position of the load's center of mass in space, typically represented by three-dimensional coordinates relative to the robot arm joints or coordinate system.
[0094] In specific implementation, the step of identifying load gravity parameters based on the target data segment and target identification axis using the least squares method includes: substituting the measured load torque data and corresponding joint data of each target identification axis in the target data segment into the robotic arm dynamics model to establish a system of linear equations with load mass and three-dimensional centroid coordinates as unknown variables; the system of linear equations describes the physical relationship between joint torque and load gravity; using the least squares method to identify parameters of the system of linear equations, by calculating the sum of squares of the differences between the measured load torque and the predicted torque of the robotic arm dynamics model, using the sum of squares of the differences as the optimization objective function, and minimizing the objective function value through iterative calculation to obtain the optimal load gravity parameter value.
[0095] Specifically, the measured load torque data (such as the torque value output by the joint motor) of each target identification axis in the target data segment and the corresponding joint data (such as joint angle and angular velocity) are substituted into the robotic arm dynamics model. By substituting the data, the dynamics model is transformed into a system of linear equations with the load mass and three-dimensional centroid coordinates as unknown variables. Each data point (i.e., the joint data and torque data at each sampling time) corresponds to one equation in the system of equations, with the measured load torque on the left and the expression composed of unknown parameters (mass, centroid coordinates) on the right. The least squares method is used to calculate the sum of squares of the differences between the measured load torque and the model predicted torque. The sum of squares of the differences is defined as the optimization objective function, which aims to minimize the value of this function by adjusting the unknown parameters (mass, centroid coordinates). Further, the values of the load mass and three-dimensional centroid coordinates are initialized. The parameter values are continuously adjusted through iterative algorithms (such as gradient descent, Gauss-Newton method, etc.) to gradually reduce the value of the objective function. In each iteration, the model predicted torque is calculated based on the current parameter values and compared with the measured torque to update the parameters and reduce the error. Continue iterating until the objective function value converges or the maximum number of iterations is reached. The final parameter value obtained is the optimal load gravity parameter.
[0096] Optionally, after identifying the load gravity parameters using the least squares method based on the target data segment and the target identification axis, the method further includes: determining the number of load gravity parameters; constructing an identification matrix based on the dynamic equation corresponding to the target identification axis, and calculating the rank of the identification matrix; comparing the rank with the number of load gravity parameters; if the rank is not less than the number, determining that the identification result is correct and outputting the load gravity parameters; if the rank is less than the number, determining that the identification matrix is not full, outputting identification failure, and prompting to add the missing motion axis.
[0097] In specific implementation, the total number of identified load gravity parameters is counted. For example, in one embodiment, the load gravity parameters include the load mass and the three-dimensional centroid coordinates, totaling four parameters. Based on the dynamic equation corresponding to the target identification axis, coefficients related to the load gravity parameters are extracted and arranged into a matrix form, i.e., the identification matrix. Each row of the identification matrix corresponds to a dynamic equation, and each column corresponds to a load gravity parameter. The identification matrix is transformed into an echelon form matrix through matrix transformation (such as Gaussian elimination), and the number of non-zero rows in the echelon form matrix is counted; this number is the rank of the matrix. Further, the calculated matrix rank is compared with the number of load gravity parameters. If the rank is not less than the number of parameters, the identification matrix is determined to be full rank, the parameters can be uniquely determined, and the identified load gravity parameters are output. If the rank is less than the number of parameters, the identification matrix is determined to be incomplete rank, the parameters cannot be uniquely determined (there is redundant or missing information), the identification failure result is output, and it is suggested that additional motion axes (such as increasing the range of joint angle changes or the direction of motion) need to be added to supplement the information.
[0098] The method provided in this embodiment verifies the reliability of gravity parameter identification by comparing the matrix rank with the number of parameters, deeply combining mathematical rigor with engineering practicality: by constructing an identification matrix and calculating its rank, it verifies from a linear algebraic level whether the dynamic equations contain enough independent information to uniquely determine the parameters, ensuring the uniqueness and stability of the parameter solutions and avoiding spurious solutions caused by equation redundancy or missing information; when the rank is insufficient, it prompts the addition of motion axes, which can directly locate the cause of identification failure, providing a clear direction for engineering debugging, avoiding blind retries, and significantly improving debugging efficiency; this verification mechanism can dynamically adapt to different working conditions, ensuring... The identifiability of parameters in various scenarios guides data acquisition strategies through mathematical theory, transforming the identification process from result-dependent to data-dependent. Simultaneously, by controlling the reasonable ratio of the number of equations to the number of parameters, the risks of overfitting (computational redundancy) and underfitting (parameters cannot be described) are prevented, balancing accuracy and computational efficiency. Ultimately, this provides a reliable gravity parameter foundation for subsequent robotic arm trajectory planning and force control algorithms, improving the stability of the entire control system from the source. Especially in industrial scenarios, it can reduce problems such as grasping jitter and trajectory deviation caused by parameter errors, enhancing the accuracy and reliability of robotic arm operations.
[0099] The method provided in this embodiment, in its first aspect, achieves precise optimization of the identification axis by determining a common identification axis through two screening processes based on the range of motion and the angle of gravity. First, the range of motion of each joint angle is calculated based on the identification trajectory, and a first identification axis with a range of motion greater than a first preset threshold is selected. This ensures that the joint has sufficient displacement excitation during trajectory movement, providing rich data samples for gravity parameter identification. Then, the angle between the rotation axis of each joint and the gravitational acceleration is calculated, and a second identification axis with an angle less than a second preset threshold is selected. This ensures that the joint is significantly affected by gravity, and that the gravity signal responds strongly in the dynamic model. Taking the common part of both as the common identification axis guarantees both the excitation intensity of the joint motion on the load and the effective projection of the gravity component into the torque data, reducing interference from invalid axes and avoiding the limitations of single-condition screening, thus improving the uniqueness and accuracy of the parameter solution from the source. In its second aspect, by preprocessing the joint data, the data quality and identification reliability are significantly improved. Data with the same velocity magnitude but opposite direction at the same joint angle are paired, and the velocity symmetry of friction is used to calculate the average, eliminating friction interference and obtaining a frictionless dynamic torque signal. Based on the velocity standard deviation, uniform velocity segments with acceleration approaching zero are selected, simplifying the complex dynamic problem into a single problem containing only a gravity term, reducing decoupling difficulty. Available identification axes are determined by the effective velocity proportion and torque variation range, focusing on joints with significant gravity influence and sufficient motion excitation, improving identification efficiency. Target data segments with high load torque are extracted to strengthen the gravity signal, suppress noise, and improve identification robustness. This preprocessing workflow is progressive, constructing a clean, focused, and strongly excited high-quality input for gravity parameter identification. Thirdly, a strategy of screening trajectories before execution optimizes the identification process efficiency from the source. By theoretically calculating the motion range and the angle of gravity, pre-screening trajectories are made to eliminate invalid trajectories with insufficient motion range or weak gravity influence in advance, reducing unnecessary operation of the robotic arm, lowering hardware wear and time costs. Based on the common identification axis, the condition number is calculated and the trajectory is adjusted to optimize the ill-conditioned degree of the identification matrix, ensuring the quality of the running trajectory and increasing the proportion of effective signals in subsequent data acquisition, thus reducing preprocessing complexity. The trajectory planning, screening, and adjustment are integrated into the pre-screening stage, eliminating the need to run different trajectories in segments, simplifying control logic, ensuring data acquisition consistency, and avoiding model discontinuity problems caused by splicing multiple trajectory segments, thereby achieving high efficiency and integration of the identification process.
[0100] Corresponding to the aforementioned embodiment of a robotic arm load gravity identification method based on trajectory pre-screening, this application also provides an embodiment of a robotic arm load gravity identification device based on trajectory pre-screening.
[0101] Figure 2 This is a schematic diagram of the robotic arm load gravity identification device based on trajectory pre-screening provided in Embodiment 2 of this application. Please refer to... Figure 2The device provided in this embodiment includes a combination module 210, a determination module 220, an adjustment module 230, and an identification module 240;
[0102] The combination module 210 is used to perform trajectory planning for the robotic arm at multiple pose points, and combine the planned trajectory data with the reverse sequence data to obtain the identified trajectory.
[0103] The determining module 220 is used to calculate the range of motion of each joint angle in the identified trajectory based on the identified trajectory, and determine the first identified axis that satisfies the first condition;
[0104] The determining module 220 is further configured to calculate the angle between the rotation axis of each joint of the robotic arm and the gravitational acceleration based on the identified trajectory, and determine the second identified axis that satisfies the second condition;
[0105] The adjustment module 230 is used to determine the common identification axis among the first identification axis and the second identification axis, calculate the condition number based on the common identification axis, and adjust the identification trajectory based on the condition number;
[0106] The determining module 220 is also used to control the robotic arm to run based on the adjusted identification trajectory, collect joint data, preprocess the joint data, and determine the target data segment and the target identification axis; the target data segment is the data in the joint data with a signal-to-noise ratio greater than a preset value, and the target identification axis is the identification axis that meets the requirements of motion excitation and load response;
[0107] The identification module 240 is used to identify the load gravity parameters based on the target data segment and the target identification axis using the least squares method.
[0108] The apparatus of this embodiment can be used to perform... Figure 1 The steps of the method embodiment shown are similar in principle and process, and will not be repeated here.
[0109] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0110] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and 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 modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0111] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for identifying the load gravity of a robotic arm based on trajectory pre-screening, characterized in that, The method includes: The robot arm performs trajectory planning at multiple pose points, and the planned trajectory data is combined with the reverse sequence data to obtain the identified trajectory. Based on the identified trajectory, the range of motion of each joint angle in the identified trajectory is calculated, and a first identification axis that satisfies the first condition is determined; wherein, for the identified trajectory, all joint angle data of each joint of the robotic arm in the identified trajectory are determined; for each joint, the maximum and minimum values of the joint angles of the joint are obtained respectively; the difference between the maximum and minimum values is calculated to obtain the angular range of motion of the joint; the angular range of motion is compared with a first preset threshold, and when the angular range of motion is greater than the first preset threshold, the joint is determined to satisfy the first condition, and the joint is determined as the first identification axis; Based on the identified trajectory, the angle between the rotation axis of each joint of the robotic arm and the gravitational acceleration is calculated to determine the second identification axis that satisfies the second condition. Specifically, the gravitational acceleration vector in the base coordinate system of the robotic arm is obtained through a gravimeter on the base. Based on the rotation matrix from the base coordinate system to the coordinate systems of each joint, the gravitational acceleration vector is transformed to the coordinate systems of each joint to obtain the gravity vector in each joint coordinate system. For each joint, the direction vector of the joint rotation axis in the current coordinate system is obtained, and the angle between the direction vector and the gravity vector in the joint coordinate system is calculated through a dot product operation. The angle is compared with a second preset threshold. If the angle is greater than the second preset threshold, the joint is determined to satisfy the second condition, and the joint is identified as the second identification axis. Determine the common identification axis among the first identification axis and the second identification axis, calculate the condition number based on the common identification axis, and adjust the identification trajectory based on the condition number; The robotic arm is controlled to operate based on the adjusted identification trajectory, collect joint data, and preprocess the joint data to determine target data segments and target identification axes. The target data segments are the joint data with a signal-to-noise ratio greater than a preset value, and the target identification axes are the identification axes that meet the requirements of motion excitation and load response. Specifically, joint data with the same velocity magnitude but opposite direction at the same joint angle are paired. Utilizing the odd symmetry of velocity due to friction, the average torque of the paired data is calculated to obtain a frictionless dynamic torque signal. Based on the friction-processed dynamic torque signal and the corresponding velocity data, a first preset number of sampling points are used before and after each joint point. The speed standard deviation is calculated, and uniform speed segments are retained and filtered to obtain uniform speed segment data. The uniform speed segment data only contains the gravity term, and the difference between the acceleration of the uniform speed segment and zero is less than a preset difference. Based on the uniform speed segment data and the speed data, the proportion of sampling points in each joint axis of the uniform speed segment data whose absolute speed value is greater than a first preset value is determined. The range of torque variation of each joint axis is calculated to see if it exceeds a preset proportion of the rated torque. Based on the proportion of sampling points and the preset proportion, the available identification axes are determined. The target identification axes are determined according to the number of available identification axes. For the target axes, the absolute value of the load torque of all sampling points of each target axis is calculated and sorted in descending order. The target data segment is determined based on the sorting result. Based on the target data segment and the target identification axis, the load gravity parameters are identified using the least squares method.
2. The method according to claim 1, characterized in that, The process of planning the trajectory of the robotic arm at multiple pose points, and combining the planned trajectory data with reverse-order data to obtain the identified trajectory includes: Multiple different pose points are selected within the workspace of the robotic arm, and the trajectory curves of the joint space are generated by inverse kinematics based on the poses in Cartesian space; the trajectory curves satisfy the smoothness constraints of the joint velocity and acceleration of the robotic arm. The trajectory curves are arranged in reverse order along the time axis to generate reverse-order trajectory data that is opposite to the original trajectory direction; The trajectory curve and the reverse trajectory data are spliced together in chronological order to obtain the identification trajectory; the robotic arm moves at the same joint angle of the identification trajectory at speeds of equal magnitude and opposite direction.
3. The method according to claim 1, characterized in that, The step of calculating the condition number based on the common identification axis and adjusting the identification trajectory based on the condition number includes: Based on the common identification axis, a coefficient matrix is constructed according to the robotic arm dynamics model; the coefficient matrix is used to describe the mapping relationship between the robotic arm motion and torque; Calculate the second norm of the coefficient matrix, calculate the second norm of the inverse matrix of the coefficient matrix, and determine the condition number based on the product of all second norms; The condition number is compared with a third preset threshold. When the condition number is less than the third preset threshold, the identification trajectory is determined as the final identification trajectory. When the condition number is not less than the third preset threshold, pose points are reselected to generate the identification trajectory.
4. The method according to claim 1, characterized in that, The step of determining the target identification axis based on the number of available identification axes includes: When the number of available identifiable axes is greater than the second preset number, the load torque value of each available identifiable axis is calculated based on the dynamic torque signal and sorted in descending order. The second preset number of available identifiable axes with the highest load torque values are selected as target identifiable axes. When the number of available identification axes is not greater than the second preset number, all available identification axes are retained as target identification axes.
5. The method according to claim 1, characterized in that, The step of identifying load gravity parameters based on the target data segment and the target identification axis using the least squares method includes: The measured load torque data of each target identification axis in the target data segment and the corresponding joint data are substituted into the dynamic model of the robotic arm to establish a system of linear equations with the load mass and three-dimensional centroid coordinates as unknown variables; the system of linear equations describes the physical relationship between joint torque and load gravity. The least squares method is used to identify the parameters of the linear equation system. The sum of squares of the difference between the measured load torque and the predicted torque of the robotic arm dynamics model is calculated. The sum of squares of the difference is used as the optimization objective function. The optimal load gravity parameter value is obtained by iterative calculation to minimize the objective function value.
6. The method according to claim 1, characterized in that, After identifying the load gravity parameters using the least squares method based on the target data segment and the target identification axis, the method further includes: Determine the number of the load gravity parameters; An identification matrix is constructed based on the dynamic equation corresponding to the target identification axis, and the rank of the identification matrix is calculated. Compare the rank with the number of load gravity parameters. If the rank is not less than the number, the identification result is determined to be correct and the load gravity parameters are output. If the rank is less than the number, the identification matrix is determined to be less than the rank, the identification fails, and a prompt is made to add the missing motion axis.
7. A robotic arm load gravity identification device based on trajectory pre-screening, characterized in that, The device includes a combination module, a determination module, an adjustment module, and an identification module; The combined module is used to perform trajectory planning for the robotic arm at multiple pose points, and to combine the planned trajectory data with the reverse sequence data to obtain the identified trajectory. The determining module is used to calculate the range of motion of each joint angle in the identified trajectory based on the identified trajectory, and determine a first identification axis that satisfies a first condition; wherein, for the identified trajectory, all joint angle data of each joint of the robotic arm in the identified trajectory are determined; for each joint, the maximum value and minimum value of the joint angle are obtained respectively; the difference between the maximum value and the minimum value is calculated to obtain the angular range of motion of the joint; the angular range of motion is compared with a first preset threshold, and when the angular range of motion is greater than the first preset threshold, the joint is determined to satisfy the first condition, and the joint is determined as the first identification axis; The determining module is further configured to calculate the angle between the rotation axis of each joint of the robotic arm and the gravitational acceleration based on the identified trajectory, and determine the second identification axis that satisfies the second condition; wherein, the gravitational acceleration vector in the base coordinate system of the robotic arm is obtained through the gravitational accelerometer of the base; based on the rotation matrix from the base coordinate system of the robotic arm to the coordinate system of each joint, the gravitational acceleration vector is transformed to the coordinate system of each joint to obtain the gravity vector in the coordinate system of each joint; for each joint, the direction vector of the joint rotation axis in the current coordinate system is obtained, and the angle between the direction vector and the gravity vector in the joint coordinate system is calculated by the dot product operation; the angle is compared with a second preset threshold, and when the angle is greater than the second preset threshold, the joint is determined to satisfy the second condition, and the joint is determined as the second identification axis; The adjustment module is used to determine the common identification axis among the first identification axis and the second identification axis, calculate the condition number based on the common identification axis, and adjust the identification trajectory based on the condition number; The determining module is further configured to control the robotic arm to operate based on the adjusted identification trajectory, collect joint data, preprocess the joint data, and determine the target data segment and the target identification axis; the target data segment is the data in the joint data with a signal-to-noise ratio greater than a preset value, and the target identification axis is the identification axis that meets the requirements of motion excitation and load response; wherein, joint data with the same speed magnitude but opposite direction at the same joint angle are paired, and the torque of the paired data is averaged using the odd symmetry of the velocity of friction to obtain a frictionless dynamic torque signal; for the friction-processed dynamic torque signal and the corresponding velocity data, based on a first preset number before and after each joint point... Measure the standard deviation of velocity at each sampling point, retain the uniform velocity segment, and filter to obtain uniform velocity segment data; the uniform velocity segment data only contains the gravity term, and the difference between the acceleration of the uniform velocity segment and zero is less than a preset difference; based on the uniform velocity segment data and velocity data, determine the proportion of sampling points in each joint axis whose absolute velocity value is greater than a first preset value, calculate whether the torque variation range of each joint axis exceeds a preset proportion of the rated torque, and determine the usable identification axis based on the sampling point proportion and the preset proportion; determine the target identification axis according to the number of usable identification axes; for the target axis, calculate the absolute value of the load torque of all sampling points of each target axis and sort them in descending order, and determine the target data segment based on the sorting result; The identification module is used to identify the load gravity parameters based on the target data segment and the target identification axis using the least squares method.
Citation Information
Patent Citations
Flexible control method and system for multi-degree-of-freedom mechanical arm
CN113601509A
Robot trajectory tracking controller design method based on reinforcement learning and dynamics feedforward fusion
CN114952849A