Construction method of data-driven seven-degree-of-freedom robot digital twin
Patent Information
- Application Number
- CN202410193672.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-21
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2044-02-21
AI Technical Summary
[0005]目前国内外对七自由度机械臂数字孪生体的系统性研究成果较少,针对七自由度机械臂数字孪生体的构建方法的研究主要是用于运行状态的可视化和仿真模拟,数字孪生体的探索与应用仍然不成熟,其模型构建、多传感器数据融合、协同交互等方面的理论与技术较为缺乏,并未体现数字孪生体所要求的虚实交互反馈、数据驱动分析和决策的特点
[0017](1)采用混合自适应粒子优化算法进行动力学参数识别,通过设置自适应惯性权重对粒子进行自适应调整,并且设计动态学习因子提高了算法的全局寻优性能,动态学习因子在算法初期可以让粒子在全局领域内大范围的搜索,在算法后期粒子能快速、准确地收敛于全局最优解,提高算法收敛速度和精度。
Smart Images

Figure CN117798935B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotics, and in particular to a method for constructing a data-driven digital twin of a seven-degree-of-freedom robotic arm. Background Technology
[0002] Given the rapid development and widespread application of industrial robotic arms, it is necessary to research motion monitoring technology for these arms. The actual working scenarios of robotic arms are complex, and accidents can cause serious losses and hazards. Therefore, it is essential to conduct motion simulations before actual operation. Simulations check whether the robotic arm can complete its intended tasks and provide early warnings of potential collisions along its path, ensuring the correctness and safety of the work path. Real-time monitoring is also a crucial aspect of robotic arm service. Managers need to understand the robotic arm's operating status promptly and conduct comprehensive monitoring to detect anomalies and improve the monitoring capabilities of managers regarding the robotic arm's working process. Furthermore, the model parameters of the robotic arm are a prerequisite for its control system design. However, in actual engineering, it is difficult to determine the kinematic and dynamic parameters of the robotic arm. Moreover, during task execution, friction often causes wear between the joints, altering the robotic arm's dynamic parameters and leading to uncertainty in the dynamic model. Therefore, to address the uncertainty of the robotic arm's dynamic model, it is necessary to design corresponding dynamic parameter identification strategies.
[0003] To address the aforementioned issues, this paper utilizes Digital Twin (DT) technology to research motion monitoring and data-driven methods for a seven-DOF robotic arm. Digital twins are a technology that integrates multiple physical, multi-scale, and multi-disciplinary attributes, possessing characteristics of real-time synchronization, faithful mapping, and high fidelity, enabling interaction and fusion between the physical and information worlds. In recent years, the concept of digital twins has been gradually integrated into the manufacturing industry. By constructing digital twins, a faithful mapping of the physical world is achieved in a virtual environment, realistically reflecting the state of the physical world. Furthermore, data mining and analysis of on-site data enable real-time optimization and intelligent decision-making in the physical world.
[0004] Data-driven digital twins of seven-DOF robotic arms offer several advantages. First, they provide excellent visual effects, better presenting data and operational status. Second, the virtual entity allows for a digital description of the seven-DOF robotic arm system. Operational data enables the identification of dynamic parameters in the digital twin, increasing the accuracy of the digital twin's mechanistic model and reducing the discrepancy between simulation and actual data. The multi-dimensional mapping of the geometric and physical dimensions of the seven-DOF robotic arm system is the essence of a digital twin system and an indispensable component for achieving intelligent operation.
[0005] Currently, there are few systematic research results on digital twins of seven-degree-of-freedom robotic arms both domestically and internationally. Research on the construction methods of digital twins of seven-degree-of-freedom robotic arms is mainly used for visualization and simulation of the operating status. The exploration and application of digital twins are still immature. The theories and technologies for model construction, multi-sensor data fusion, and collaborative interaction are relatively lacking, and the characteristics of virtual-real interaction feedback, data-driven analysis, and decision-making required by digital twins are not reflected.
[0006] Therefore, in-depth exploration of digital twin technology, and how to construct a data-driven digital twin of a seven-degree-of-freedom robotic arm, to achieve a faithful mapping, dynamic update, and high-fidelity feedback between the digital twin and the physical entity of the seven-degree-of-freedom robotic arm, has become an urgent technical challenge to be solved. Summary of the Invention
[0007] To address the shortcomings of existing technologies, this invention provides a data-driven method for constructing a digital twin of a seven-degree-of-freedom robotic arm. This method enables the digital twin of the seven-degree-of-freedom robotic arm to identify the independent parameters of each joint of the physical entity, and achieves dynamic interaction and updating of the digital twin through closed-loop control and visualization of its operating status.
[0008] Technical solution to achieve the objective of this invention: A method for constructing a data-driven digital twin of a seven-DOF robotic arm, comprising the following steps:
[0009] Step 1: Based on the geometric information and dynamic characteristics of the physical entity of the robotic arm under test, a seven-degree-of-freedom robotic arm dynamic model is established using the Newton-Euler method. The corresponding dynamic model is linearized, and a friction term is added to the corresponding model according to the actual situation to obtain a linearized dynamic model containing the friction term.
[0010] Step 2: To ensure that the independent parameters of each joint in the dynamic model of the seven-degree-of-freedom manipulator are physically consistent with the parameters of the physical entity of the manipulator under test, set corresponding physical consistency constraints for the independent parameters of each joint in the dynamic model of the seven-degree-of-freedom manipulator.
[0011] Step 3: Based on the dynamic model of the seven-degree-of-freedom robotic arm, design the motion controller of the seven-degree-of-freedom robotic arm to realize the motion control simulation of the digital twin virtual entity of the robotic arm, as well as the trajectory tracking of the set motion target of the corresponding real robotic arm in physical space.
[0012] Step 4: Set up several position sensors and several torque sensors at the joints of the physical entity of the robot arm to be tested, design the excitation trajectory, and realize the trajectory tracking of the excitation trajectory of the robot arm through the controller in Step 3. Collect the real motion data of the seven-degree-of-freedom robot arm through the position sensors and torque sensors of the robot arm, and preprocess the collected real motion data to obtain preprocessed motion data to ensure the accuracy and consistency of the data.
[0013] Step 5: Using preprocessed motion data, a hybrid adaptive particle swarm optimization algorithm is used to identify the independent dynamic parameters of the robotic arm. The identified independent dynamic parameters are applied to the digital twin and the controller to optimize and iterate the digital twin data and the controller parameters to ensure the accuracy and consistency of the digital twin construction, and obtain the optimized seven-degree-of-freedom robotic arm dynamic model.
[0014] Step 6: Design a robotic arm motion trajectory different from the excitation trajectory as a verification trajectory, collect the running data of the verification trajectory as a verification set, and use the optimized seven-degree-of-freedom robotic arm dynamics model to identify joint torques on the verification set and verify the model accuracy.
[0015] Step 7: Apply the identified and verified dynamic parameters of the robotic arm to the digital twin, build a 3D model of the CAD assembly of the seven-DOF robotic arm and the corresponding dynamic model, and construct a simulation model of the digital twin of the seven-DOF robotic arm in Gazebo using the ROS system based on the 3D model of the CAD assembly and the corresponding dynamic model. Then, use the simulation model to visualize the motion of the digital twin and the twin data to ensure the accuracy and consistency of the digital twin construction.
[0016] The significant advantages of this invention compared to existing technologies are:
[0017] (1) A hybrid adaptive particle optimization algorithm is used to identify dynamic parameters. The particles are adaptively adjusted by setting adaptive inertia weights. A dynamic learning factor is designed to improve the global optimization performance of the algorithm. In the early stage of the algorithm, the dynamic learning factor allows the particles to search a wide range in the global domain. In the later stage of the algorithm, the particles can converge to the global optimal solution quickly and accurately, thus improving the convergence speed and accuracy of the algorithm.
[0018] (2) Compared with the minimum inertial set parameters of traditional parameter identification, this disclosure sets corresponding physical consistency constraints for the independent parameters of each joint in the dynamic model of a seven-degree-of-freedom manipulator. All the independent dynamic parameters of the identified manipulator have good physical consistency, which ensures the real reliability of the constructed digital twin.
[0019] (3) The ROS system under Ubuntu is used to integrate the digital twin and realize the real-time visualization of the robotic arm movement and the interactive update of the twin data. The operation is relatively simple, highly portable, and easy to implement in engineering practice. Attached Figure Description
[0020] Figure 1 A schematic diagram of the optimized excitation trajectory curves of each joint of a seven-DOF robotic arm, as exemplarily shown in this disclosure, is provided.
[0021] Figure 2 An exemplary schematic diagram of the dynamic parameter identification process based on the hybrid adaptive particle optimization algorithm of this disclosure is shown.
[0022] Figure 3 An exemplary schematic diagram of the actual and identified torque values of the first and second joints of a seven-DOF robotic arm under a verification trajectory of an example of this disclosure is shown.
[0023] Figure 4 An exemplary schematic diagram of the actual and identified torque values of the third and fourth joints of a seven-DOF robotic arm under a verification trajectory of an example of this disclosure is shown.
[0024] Figure 5 An exemplary schematic diagram of the actual and identified torque values of the fifth and sixth joints of a seven-DOF robotic arm under a verification trajectory of an example of this disclosure is shown.
[0025] Figure 6 An exemplary schematic diagram of the actual and identified torque values of the seventh joint of a seven-DOF robotic arm under a verification trajectory of an example of this disclosure is shown.
[0026] Figure 7 An example diagram illustrating the error curves of the actual and identified torque values of the first and second joints of a seven-DOF robotic arm under a verification trajectory of an example of this disclosure is shown.
[0027] Figure 8 An example diagram illustrating the error curves of the actual and identified torque values of the third and fourth joints of a seven-DOF robotic arm under a verification trajectory of an example of this disclosure is shown.
[0028] Figure 9 An example diagram illustrating the error curves of the actual and identified torque values of the fifth and sixth joints of a seven-DOF robotic arm under a verification trajectory of an example of this disclosure is shown.
[0029] Figure 10 An example diagram illustrating the error curves of the actual and identified torque values of the seventh joint of a seven-DOF robotic arm under a verification trajectory of an example of this disclosure is shown. Detailed Implementation
[0030] To provide a better understanding of the structural features and effects achieved by the present invention, a detailed description is provided below, accompanied by preferred embodiments and accompanying drawings:
[0031] Combination Figures 1-10 A data-driven method for constructing a digital twin of a seven-DOF robotic arm, comprising the following steps:
[0032] Step 1: Based on the geometric information and dynamic characteristics of the physical entity of the robotic arm under test, a seven-degree-of-freedom robotic arm dynamic model is established using the Newton-Euler method. The corresponding dynamic model is then linearized, and a friction term is added to the model according to the actual situation, resulting in a linearized dynamic model containing the friction term, as follows:
[0033] Step 1.1: Based on the geometric information and dynamic characteristics of the physical entity of the robotic arm under test, establish the inverse dynamic model of the seven-degree-of-freedom robotic arm using the Newton-Euler method:
[0034]
[0035] Where τ is the driving torque on each joint, and q is the joint position. The joint angular velocity, Let M(q) be the joint angular acceleration and M(q) be the inertia matrix. G(q) is the matrix of centrifugal force and Coriolis force, and G(q) is the matrix of gravity terms.
[0036] Step 1.2: Linearize the seven-degree-of-freedom inverse dynamics model, organize the corresponding minimum inertial parameter set, linearize the dynamics, and add a friction term to obtain a linearized dynamics model containing the friction term.
[0037] Its friction term is as follows:
[0038]
[0039] Where, τ f It is the total frictional torque on the joints of the robotic arm, f v It is the coefficient of viscous friction, f c It is the Coulomb friction coefficient, f o is the bias coefficient, and sign() is the sign function.
[0040] Linearizing equation (1) and rearranging it to obtain the corresponding minimum set of inertial parameters, we get the corresponding linearized dynamic equation:
[0041]
[0042] Where τ is the driving torque on each joint; This is the observation matrix.
[0043] θ(p1,p2,p3) is the minimum set of inertial parameters.
[0044] Joint mass vector p1 = (m1m2…m7) T m i Let T represent the mass of the i-th joint, and T denote the transpose.
[0045] Joint centroid vector p2 = (c x1 c y1 c z1 …c x7 c y7 c z7 ) T c xi c represents the position of the centroid of the i-th joint in the x-direction. yi c represents the position of the centroid of the i-th joint in the y-direction. zi This indicates the position of the centroid of the i-th joint in the z-direction.
[0046] The inertial tensor vector p3 at the joint centroid is (I c1 T …I c7 T ) T I ci Let I represent the inertial tensor vector at the centroid of the i-th joint. ci =(I cxxi I cxyi I cxzi I cyyi I cyzi I czzi ) T I cxxi I cyyi I czzi I represents the three principal moments of inertia of the inertia tensor at the centroid of the i-th joint. cxyi I cxzi I cyzi Let represent the product of the three inertial tensors at the centroid of the i-th joint.
[0047] Add equation (2) and equation (3)
[0048]
[0049] The linearized dynamic model including the friction term is obtained as follows:
[0050]
[0051] p a =(p1) T p2 T p3T ,f T ) T
[0052] Where τ' represents the driving torque of each joint considering frictional torque. p is an extended parameter set that includes the friction coefficient. a Let f be the vector of all independent dynamic parameters of the robotic arm, where f = (f v1 ,f c1 ,f o1 ,…,f v7 ,f c7 ,f o7 ) T f represents the friction coefficient vector of joints 1 through 7. vi f is the viscous friction coefficient of the i-th joint. ci f is the Coulomb friction coefficient of the i-th joint. oi It is the bias coefficient of the i-th joint.
[0053] Proceed to step 2.
[0054] Step 2: To ensure physical consistency between the independent parameters of each link in the seven-DOF manipulator dynamics model and the parameters of the physical entity of the manipulator under test, corresponding physical consistency constraints are set for the independent parameters of each link in the seven-DOF manipulator dynamics model, as follows:
[0055] To ensure the physical consistency between the mass of each joint and the physical entity of the robotic arm under test, the following settings are made:
[0056] 0 <m i <m max ,i=1…7 (6)
[0057] Where, m max This indicates the maximum mass of a single joint.
[0058] Furthermore, the sum of the masses of all joints has physical consistency with the physical entity of the robotic arm under test, that is:
[0059]
[0060] Where, m all,min Let m represent the minimum sum of the masses of all joints. all,max This represents the maximum sum of the masses of all joints.
[0061] The inertial tensor matrix I at the centroid of the i-th joint i for:
[0062]
[0063] From the properties of the inertia tensor at the center of mass of a rigid body, we know that the eigenvalues of the inertia tensor matrix at the center of mass of joint i satisfy the following inequality:
[0064] J i1 >0,J i2 >0,J i3 >0
[0065]
[0066] Among them, J i1 J i2 J i3 I represents the inertial tensor matrix at the centroid of joint i. i The three eigenvalues.
[0067] Further processing of equation (9) yields:
[0068]
[0069] Therefore, the physical consistency constraint of the centroid inertial tensor is obtained as follows:
[0070]
[0071] Wherein, the inertial tensor matrix I at the centroid of the i-th joint is... i trace tr(I) i ) = J i1 +J i2 +J i3 , λ max (I i ) represents the inertial tensor matrix I at the centroid of the i-th joint. i The largest eigenvalue.
[0072] Proceed to step 3.
[0073] Step 3: Based on the dynamic model of the seven-degree-of-freedom robotic arm, design the motion controller for the seven-degree-of-freedom robotic arm to realize the motion control simulation of the digital twin virtual entity of the robotic arm, as well as the trajectory tracking of the set motion target of the corresponding real robotic arm in physical space, as detailed below:
[0074] e1 = x1 d -x1 (12)
[0075]
[0076] u=K p ·e1+K d ·e2 (14)
[0077] Where e1 is the position error, e2 is the angular velocity error, and x1 is the position error. d For target reference position, x1 represents the target reference speed, and x1 represents the target's current position. Let u be the target current speed, and K be the controller output. p K is the proportionality coefficient. d is the differential coefficient.
[0078] Proceed to step 4.
[0079] Step 4: Set up several position sensors and several torque sensors at the joints of the physical entity of the robot arm under test, design the excitation trajectory, and realize trajectory tracking of the excitation trajectory of the robot arm through the controller in Step 3. Collect the real motion data of the seven-degree-of-freedom robot arm through the position sensors and torque sensors of the robot arm, and preprocess the collected real motion data to obtain preprocessed motion data to ensure the accuracy and consistency of the data.
[0080] The Fourier series polynomial trajectory of the excitation trajectory is designed, and its specific expression is as follows:
[0081]
[0082]
[0083]
[0084] Where, q i (t), w respectively represent the angular position, angular velocity, and angular acceleration of the i-th joint at time t. f q represents the harmonic frequency. 0,i a n,i b n,i The coefficients of the Fourier series polynomial of the i-th joint are given, and the harmonic numbers are n = 12…N, where N represents the total number of harmonics.
[0085] To determine the coefficients q of the Fourier series polynomial 0,i a n,i b n,i ,n=12…N, the condition number of the observation matrix of the linear equation of motion. As the objective function, the goal is to minimize the objective function, and the following boundary conditions are added when designing the excitation trajectory. The optimization problem of the excitation trajectory is described as follows:
[0086]
[0087] in, Let x be the condition number of the observation matrix under the parameter vector x containing the excitation trajectories of all joints of the robotic arm;
[0088] x=[x1 T x2 T…x7 T ] T This is a parameter vector containing the excitation trajectories of all joints of the robotic arm.
[0089] x i T =[a 1,i b 1,i …a 5,i b 5,i θ i,0 ] represents the Fourier series parameter of the i-th joint of the robotic arm.
[0090] q i (0) and q i (t f ) represents the starting angle position and ending angle position of the i-th joint of the robotic arm.
[0091] and This represents the initial angular velocity and the final angular velocity of the i-th joint of the robotic arm.
[0092] and This represents the initial angular acceleration and the final angular acceleration of the i-th joint of the robotic arm.
[0093] and This represents the minimum and maximum angular positions constrained by the i-th joint of the robotic arm.
[0094] and This represents the minimum and maximum angular velocities limited by the i-th joint of the robotic arm.
[0095] and This represents the minimum and maximum angular accelerations limited by the i-th joint of the robotic arm.
[0096] The optimization problem of the excitation trajectory is solved using the global optimization toolbox in MATLAB, and the coefficients q in the Fourier series polynomials of each joint of the robotic arm are determined. 0,i a n,i b n,i .
[0097] Several position sensors and several torque sensors are set at the joints of the physical entity of the robot arm under test. The optimized excitation trajectory is used as the reference trajectory. The position controller in step 3 realizes the trajectory tracking of the excitation trajectory of the robot arm. The position sensors and torque sensors of the robot arm collect the real motion data of the seven-degree-of-freedom robot arm. The collected real motion data is preprocessed.
[0098] First, a time-domain averaging filter is used, which means taking the time-domain average of the sampled data from multiple periods:
[0099]
[0100] Where M represents the number of times the robotic arm repeats the motion under the excitation trajectory, and m is the sampling cycle number.
[0101] These respectively represent the values at t k The position, velocity, and joint torque of the i-th joint of the robotic arm at any given time are sampled as the average value of signals over M motion cycles.
[0102] q m (t k ), τ m (t k ) respectively correspond to t in the m-th sampling period of the robotic arm k The original sampled values of position, velocity, and joint torque at any given moment.
[0103] Then, a low-pass filter is designed to eliminate the high-frequency oscillations in the sampled data, making the sampled data continuous and smooth. Specifically, the amplitude and frequency relationship of the Y-order Butterworth low-pass filter is as follows:
[0104]
[0105] Where H(ω) is the frequency response function of the Butterworth filter, ω is the frequency of the current sampled signal, and ω c Y is the cutoff frequency of the signal at -3dB, and Y is the filter order.
[0106] Proceed to step 5.
[0107] Combination Figure 2 Step 5: Using the preprocessed motion data, the hybrid adaptive particle swarm optimization algorithm is used to identify the independent dynamic parameters of the robotic arm. The identified independent dynamic parameters are applied to the digital twin and the controller to optimize and iterate the digital twin data and the controller parameters to ensure the accuracy and consistency of the digital twin construction and obtain the optimized seven-degree-of-freedom robotic arm dynamic model.
[0108] The specific steps for identifying the dynamic parameters of the robotic arm based on the hybrid adaptive particle swarm optimization algorithm are as follows:
[0109] First, let the population size be U and the particle dimension be Q. Then, in a particle swarm S:
[0110] S = [s1 s2…s r …s U ]T (twenty one)
[0111] For the r-th particle s r It has a positional component X. r and velocity component V r ,Right now:
[0112] s r =[X r V r ],r=1,2……U (22)
[0113] The particle swarm position and velocity are initialized using the random number rand() function, with particle s as the initial value. r For example, we have:
[0114] X r =(x1,x2,x3,…,x Q ) (twenty three)
[0115] V r =(v1,v2,v3,…,v Q ) (twenty four)
[0116] x1,x2,x3,…,x Q Represents particle s r Positional components from dimension 1 to dimension Q.
[0117] v1,v2,v3,…,v Q Represents particle s r Velocity components from the 1st to the Qth dimension.
[0118] Combining equations (5), (7), and (11), we set the objective function F(p) with a physical consistency penalty term. a ):
[0119]
[0120]
[0121] Where, τ r This represents the actual observed torque. Let μ(p3) represent the mass penalty term, and μ(p3) represent the centroid inertia tensor penalty term. i Let represent the centroid inertia tensor penalty term of the i-th joint, and min() denotes the minimum value function.
[0122] The particle velocity update formula is:
[0123]
[0124] Among them, V lpbest represents the particle velocity in the l-th iteration, rand() represents a random number between [0,1], and pbest l gbest represents the optimal particle position in the l-th iteration. l X represents the globally optimal particle position up to the l-th iteration. l represents the current particle position, w represents the adaptive inertia weight, and c1 and c2 represent dynamic learning factors.
[0125] The particle position update formula is:
[0126] X l =X l +V l (27)
[0127] The particle swarm is iterated according to equations (26) and (27), and the fitness of the particle swarm position in each iteration is calculated according to the objective function. The particle with the best fitness (i.e., the smallest objective function value) in the l-th iteration is the local optimal particle position pbest. l .
[0128] Compare the local optimal particle positions from the initial particle swarm to the local optimal particle positions up to the l-th iteration [pbest0 pbest1…pbest] l The position of the particle with the best fitness is selected as the globally optimal particle (gbest) up to the l-th iteration. l .
[0129] For the initial particle swarm, the fitness of each particle in the initial particle swarm is calculated according to the objective function. The locally optimal particle in the swarm is both the locally optimal particle and the globally optimal particle, that is, pbest0 = gbest0.
[0130] The adaptive inertia weight w for hybrid adaptive particle swarm optimization is expressed as follows:
[0131]
[0132] Among them, w min and w max F represents the maximum and minimum weights set, respectively. avg p represents the average fitness of all particles iterated up to the current generation. a g best F(p) represents the globally optimal particle in the current iteration. a ) represents the fitness function value of the current particle.
[0133] The adaptive expressions for the dynamic learning factors c1 and c2 of the hybrid adaptive particle swarm optimization are:
[0134]
[0135]
[0136]
[0137] Where c1 represents the global learning factor, c2 represents the local learning factor, l represents the current particle swarm iteration number, and L max is the maximum number of iterations, and k is an intermediate function.
[0138] Adaptive inertia weights and dynamic learning factors are used to continuously iterate the particle swarm in terms of velocity and position using equations (26) and (27) until the objective function F(p) is achieved. a If the change in the objective function value is less than the preset convergence value or the iteration reaches the maximum number of iterations, the iteration stops. At this point, the particle p corresponding to the objective function... a g best p is the vector of all independent dynamic parameters of the robotic arm a .
[0139] Proceed to step 6.
[0140] In step 6, a robotic arm motion trajectory different from the excitation trajectory is designed as a verification trajectory. The running data of the verification trajectory is collected as a verification set. The joint torque is identified on the verification set using the parameter-optimized seven-degree-of-freedom robotic arm dynamics model to verify the model accuracy.
[0141] Specifically, the vector of all independent dynamic parameters p of the robotic arm obtained in step 5 through the hybrid adaptive particle swarm algorithm dynamic parameter identification is used. a As parameters for the corresponding linearized dynamic model including friction terms, a robotic arm motion trajectory different from the excitation trajectory designed in step 4 is used as the verification trajectory. The running data of the verification trajectory is collected as the verification set. Joint torque verification is performed on the linearized dynamic model including friction terms after parameter identification, and the torque verification accuracy (RMSE) is calculated at this time.
[0142]
[0143]
[0144] in, This represents the estimated torque calculated from the linearized dynamic model including the friction term after parameter identification, where H represents the total number of sampling points. τ represents the estimated torque with respect to the h-th sampling point. r,h This represents the actual torque at the h-th sampling point.
[0145] Proceed to step 7.
[0146] Step 7: Apply the identified and verified dynamic parameters of the robotic arm to the digital twin, build a 3D model of the CAD assembly of the seven-DOF robotic arm and the corresponding dynamic model, and construct a simulation model of the digital twin of the seven-DOF robotic arm in Gazebo using the ROS system based on the 3D model of the CAD assembly and the corresponding dynamic model. Then, use the simulation model to visualize the motion of the digital twin and the twin data to ensure the accuracy and consistency of the digital twin construction.
[0147] Furthermore, based on the 3D model of the CAD assembly and the corresponding dynamic model, a simulation model of a seven-DOF robotic arm digital twin is constructed in Gazebo using the ROS system. The 3D model of the seven-DOF robotic arm CAD assembly is imported into Gazebo, and the simulation model is used to visualize the motion of the digital twin and the twin data.
[0148] By subscribing to topics related to the seven-DOF robotic arm, Gazebo visualizes the robotic arm's operating status and data in real time. The subscribed topics mainly include: RobotModel, which displays the robotic arm's 3D model; TF, which displays coordinate system transformation relationships; Trajectory, which displays the robotic arm's trajectory; and JointStatePublisher, which displays joint states, thus enabling visualization of the robotic arm's operating status.
[0149] Based on the hybrid adaptive particle swarm optimization algorithm, the dynamic parameters of the real robotic arm are identified, and the parameters of the seven-DOF robotic arm digital twin are set in the Unified Robot Description Format (URDF) file in ROS. The twin data of the digital twin and the observation data of the sensors are visualized in real time through the rqt plugin in ROS, and the operation data of the seven-DOF robotic arm digital twin are monitored in real time, realizing the virtual-real mapping of the seven-DOF robotic arm digital twin.
[0150] The beneficial effects of this invention are as follows: This invention establishes a digital twin of a seven-degree-of-freedom (DOF) robotic arm system, tailored to its characteristics; based on the physical consistency between the digital twin and the physical entity, physical consistency constraints are set for independent dynamic parameters; independent dynamic parameters of the robotic arm are identified using a hybrid adaptive particle swarm optimization (PSO) algorithm, with adaptive weights and dynamic learning factors designed to increase the algorithm's global search capability and accelerate parameter convergence, thus improving the efficiency of dynamic parameter identification; a visual digital twin of the seven-DOF robotic arm is established in the ROS system, and the digital twin parameters are updated using the identified parameters, enhancing the detection of the robotic arm's real-time state and the ability to update the digital twin's parameters; the identification parameters based on the hybrid adaptive particle swarm optimization algorithm, as tested in simulations and experiments, can effectively identify the robotic arm's torque, demonstrating the authenticity and effectiveness of the independent dynamic parameters, increasing the accuracy of the digital twin mechanism model, and reducing the difference between simulation data and actual data.
[0151] Example:
[0152] This embodiment uses the FrankaEmika seven-DOF robotic arm from Franka GmbH, Germany, as the main research subject, employing a PD position controller to achieve trajectory tracking, with a proportional coefficient K. p =10.5, differential coefficient K d =4.2.
[0153] In the excitation trajectory optimization design, a five-order Fourier series polynomial trajectory is selected, with harmonic number N = 5 and harmonic frequency w. f =0.1π, the fmincon function in the MATLAB optimization toolbox is used to solve the parameters of the optimization problem in equation (18), and the results are calculated. Figure 1 The excitation trajectory curves for each joint within one cycle are shown below. The specific values in this example are as follows:
[0154] Table 1. Coefficients of the fifth-order Fourier series polynomials
[0155]
[0156]
[0157] The aforementioned PD position controller was used, and a multi-level Fourier series polynomial trajectory was configured in ROS. The control commands of the controller were sent to the actual robotic arm through the FCI controller box provided by Franka. At the same time, the FCI controller could return the joint torque value through the output measured by the joint torque sensor, and return the angular position and angular velocity of the joint at this time by measuring the output signal of the encoder inside the motor. The angular acceleration value of the joint at the current moment could be obtained by differentially differentiating the joint angular velocity. The torque, position, velocity and acceleration signals output by the FCI were saved to the system file in ROS using the rosbag command. The data acquisition time was 200 seconds, that is, 10 motion cycles, and the data acquisition phase was completed.
[0158] The acquired data is preprocessed using time-domain averaging and Butterworth filtering, where the cutoff frequency ω of the Butterworth filter is set. c =5, filter order Y=4.
[0159] In ROS, ROS topics are used to publish and subscribe to the Franka robotic arm's state data, such as position, velocity, and joint torque. The robotic arm's motion control is achieved through ROS services or custom messages. In the physical robotic arm, state data is collected in real time by sensor devices (such as encoders and torque sensors) at a frequency of 1kHz, and transmitted to the ROS node through physical connections (such as sensor interfaces). Control commands are published by the ROS node and a network connection is established with the robotic arm via TCP / IP protocol for data transmission.
[0160] Configure parameters for the hybrid adaptive particle swarm algorithm:
[0161] Select dynamic learning factors c1 and c2, and adaptive inertia weight w. min =0.3, w max =0.8, population size U=8000, particle dimension Q=91, maximum number of iterations L max =1000, the minimum sum of the masses of all joints, m all,min =16, the maximum value of the sum of the masses of all joints, m all,max =18, such as Figure 2 Perform a hybrid adaptive particle swarm optimization algorithm, repeating the population migration iteration until the maximum number of iterations l = L is reached. max =1000 or the objective function value F(p) a The iteration stops when the value of the particle p is less than 0.001, and the globally optimal particle p at that point is selected. a gbest is the vector of all independent dynamic parameters of the robotic arm. a .
[0162] Once the hybrid adaptive particle swarm optimization algorithm stops iterating, the optimal vector of all independent dynamic parameters p of the robotic arm is obtained. a These parameters will be the parameters of the optimized robotic arm dynamics model. Table 2 shows all the independent dynamic parameters of the robotic arm identified based on the hybrid adaptive particle swarm optimization algorithm:
[0163] Table 2. Values of all independent dynamic parameters identified based on the hybrid adaptive particle swarm algorithm.
[0164] <![CDATA[m i ]]> 2.5491 3.1743 2.4814 4.0561 2.8646 1.9093 0.6475 <![CDATA[c xi ]]> -0.0424 -0.0021 0.0465 -0.0385 0.0027 0.0555 0.0027 <![CDATA[c xi ]]> 0.0499 -0.0645 -0.0024 0.1227 0.0057 -0.0159 0.0030 <![CDATA[c xi ]]> -0.3989 -0.0035 -0.0522 0.0042 -0.1373 -0.0415 0.0423 <![CDATA[I cxxi ]]> 0.6542 8.142e-3 3.015e-5 0.0026 0.0036 0.0016 0.0013 <![CDATA[I cxyi ]]> -2.44e-5 -4.15e-3 -4.51e-3 7.79e-3 -2.11e-3 1.04e-4 -5.35e-4 <![CDATA[I cxzi ]]> 8.39e-3 9.45e-3 -0.0011 -1.33e-3 -4.04e-3 -1.16e-3 -1.35e-3 <![CDATA[I cyyi ]]> 0.8124 0.0291 0.0036 0.0019 0.0029 5.24e-3 0.0013 <![CDATA[I cyzi ]]> -1.34e-3 -3.45e-4 0.0012 8361e-3 3.49e-4 2.51e-4 -4.82e-4 <![CDATA[I czzi ]]> 9.14e-3 0.0018 0.0014 0.0028 7.57e-3 6.24e-3 3.985e-3 <![CDATA[f ci ]]> 0.3475 0.1549 0.1485 0.2596 0.3412 0.1368 0.1694 <![CDATA[f vi ]]> 0.0752 0.2347 0.0357 0.1574 0.1147 0.0012 0.0625 <![CDATA[f oi ]]> -0.0984 -0.6245 -0.1258 -0.3416 0.0062 0.1476 -0.0058
[0165] Validation and Testing: Validate the performance of the optimal parameters by testing the model's performance using a different set of reference trajectories than the excitation trajectories. Here, all trajectories are set to q. i =0.4sin(0.06πt), i=12…7; Apply the PD position controller and load the dynamic parameters shown in Table 2 to calculate the force identification value, calculate the error between the actual torque value and the identified value, and obtain the root mean square error (RMSE) on this verification trajectory. Figures 3 to 6 The comparison chart of the identified torque and the measured torque shown indicates that the identified torque and the measured torque are basically in agreement. Figures 7 to 10 The figure shows the error curves between the identified torque and the measured torque. Table 3 shows the root mean square error (RMSE) values on the verification trajectory.
[0166] Table 3. Root Mean Square Error (RMSE) of Joint Identification Torque
[0167]
[0168] Applying optimal parameters in the digital twin: The obtained optimal parameters are applied to the URDF file of the robotic arm. `roslaunch franka_gazebo panda_gazebo.launch` is launched to implement the dynamic simulation of the Franka robotic arm using Gazebo. `roslaunch franka_control panda_control.launch` is launched to load the Franka controller. `roslaunch franka_description panda_rviz.launch` is launched to start RViz and load the robotic arm model. RQT is used to record and display the real-time motion trajectory curves of the robotic arm, realizing the visualization of the robotic arm's operating data and status in ROS, as well as the iterative update of the robotic arm parameters.
[0169] The algorithm proposed in this invention can accurately estimate the dynamic parameters of the Franka Emika seven-DOF manipulator, and its accuracy has been verified. Compared with the traditional least squares-based dynamic parameter identification algorithm, it has high accuracy and fast convergence. Furthermore, due to the inclusion of a penalty term based on physical consistency in the algorithm, the identified independent parameters are authentic. A digital twin model of the seven-DOF manipulator is established in the ROS system, and the identified independent dynamic parameters are applied to the digital twin, improving the realism and credibility of the digital twin. The dynamic simulation of the seven-DOF manipulator digital twin model is implemented using Gazebo, realizing the visualization of the digital twin and multi-dimensional mapping of the physical entity's geometry and physics.
Claims
1. A method for constructing a data-driven digital twin of a seven-DOF robotic arm, characterized in that, The construction steps are as follows: Step 1: Based on the geometric information and dynamic characteristics of the physical entity of the robotic arm under test, a seven-degree-of-freedom robotic arm dynamic model is established using the Newton-Euler method. The corresponding dynamic model is linearized, and a friction term is added to the corresponding model according to the actual situation to obtain a linearized dynamic model containing the friction term. Step 2: To ensure that the independent parameters of each joint in the dynamic model of the seven-degree-of-freedom manipulator are physically consistent with the parameters of the physical entity of the manipulator under test, set corresponding physical consistency constraints for the independent parameters of each joint in the dynamic model of the seven-degree-of-freedom manipulator. Step 3: Based on the dynamic model of the seven-degree-of-freedom robotic arm, design the motion controller of the seven-degree-of-freedom robotic arm to realize the motion control simulation of the digital twin virtual entity of the robotic arm, as well as the trajectory tracking of the set motion target of the corresponding real robotic arm in physical space. Step 4: Set up several position sensors and several torque sensors at the joints of the physical entity of the robot arm to be tested, design the excitation trajectory, and realize the trajectory tracking of the excitation trajectory of the robot arm through the controller in Step 3. Collect the real motion data of the seven-degree-of-freedom robot arm through the position sensors and torque sensors of the robot arm, and preprocess the collected real motion data to obtain preprocessed motion data to ensure the accuracy and consistency of the data. Step 5: Using preprocessed motion data, a hybrid adaptive particle swarm optimization algorithm is used to identify independent dynamic parameters of the robotic arm. The identified independent dynamic parameters are applied to the digital twin and the controller to optimize and iterate the digital twin data and the controller parameters to ensure the accuracy and consistency of the digital twin construction and obtain the optimized seven-degree-of-freedom robotic arm dynamic model. Step 6: Design a robotic arm motion trajectory different from the excitation trajectory as a verification trajectory, collect the running data of the verification trajectory as a verification set, and use the parameter-optimized seven-degree-of-freedom robotic arm dynamic model to identify joint torques on the verification set and verify the model accuracy. Step 7: Apply the identified and verified dynamic parameters of the robotic arm to the digital twin, build a 3D model of the CAD assembly of the seven-DOF robotic arm and the corresponding dynamic model, and construct a simulation model of the digital twin of the seven-DOF robotic arm in Gazebo using the ROS system based on the 3D model of the CAD assembly and the corresponding dynamic model. Then, use the simulation model to visualize the motion of the digital twin and the twin data to ensure the accuracy and consistency of the digital twin construction.
2. The method for constructing a data-driven seven-DOF robotic arm digital twin as described in claim 1, characterized in that, In step 1, based on the geometric information and dynamic characteristics of the physical entity of the robotic arm under test, a seven-degree-of-freedom robotic arm dynamic model is established using the Newton-Euler method. The corresponding dynamic model is then linearized, and a friction term is added to the model according to the actual situation, resulting in a linearized dynamic model containing the friction term, as detailed below: Step 1.1: Based on the geometric information and dynamic characteristics of the physical entity of the robotic arm under test, establish the inverse dynamic model of the seven-degree-of-freedom robotic arm using the Newton-Euler method: , in, The driving torque acting on each joint. This refers to the joint position. The joint angular velocity, Joint angular acceleration, The inertia matrix, The matrix represents the centrifugal force and the Coriolis force. This is the gravity term matrix; Step 1.2, the friction term of the seven-degree-of-freedom inverse dynamics model is as follows: , in, It is the total frictional torque acting on the joints of the robotic arm. It is the coefficient of viscous friction. It is the Coulomb friction coefficient. It is the bias coefficient. It is a symbolic function; Linearizing equation (1) and rearranging it to obtain the corresponding minimum set of inertial parameters, we get the corresponding linearized dynamic equation: , in, The driving torque acting on each joint; The observation matrix; This is the minimum set of inertial parameters; Joint mass vector ( , Indicates the first The quality of each joint Indicates transpose; Joint centroid vector , Indicates the first Joint Position of the centroid in the direction of the direction Indicates the first Joint Position of the centroid in the direction of the direction Indicates the first Joint Position of the centroid; Inertial tensor vector at the joint centroid , Indicates the first The inertial tensor vector at the centroid of each joint. , , , Indicates the first The three principal moments of inertia of the inertia tensor at the center of mass of each joint. , , Indicates the first The product of the three inertial tensors at the center of mass of each joint; Add equation (2) and equation (3): , The linearized dynamic model including the friction term is obtained as follows: , , in, This represents the driving torque of each joint, taking into account frictional torque. For an extended set of parameters including the friction coefficient, This is a vector of all independent dynamic parameters of the robotic arm. This represents the friction coefficient vector for joints 1 through 7. It is the first The viscous friction coefficient of each joint, It is the first Coulomb friction coefficient of each joint, It is the first The bias coefficient of each joint.
3. The method for constructing a data-driven seven-DOF robotic arm digital twin as described in claim 2, characterized in that, In step 2, physical consistency constraints are set for the independent parameters of each joint in the dynamic model of the seven-DOF robotic arm, as follows: To ensure the physical consistency between the mass of each joint and the physical entity of the robotic arm under test, the following settings are made: , in, Indicates the maximum mass of a single joint; Furthermore, the sum of the masses of all joints has physical consistency with the physical entity of the robotic arm under test, that is... , in, This represents the minimum sum of the masses of all joints. This represents the maximum sum of the masses of all joints; joint Inertial tensor matrix at the centroid for: , From the properties of the inertial tensor at the center of mass of a rigid body, we know that the first... The eigenvalues of the inertial tensor matrix at the centroids of each joint satisfy the following inequality: , , in, Indicates joint Inertial tensor matrix at the centroid The three eigenvalues; Further processing of equation (9) yields: , Therefore, the physical consistency constraint of the centroid inertial tensor is obtained as follows: , Among them, the The inertial tensor matrix at the centroid of each joint traces Indicates the first The inertial tensor matrix at the centroid of each joint The largest eigenvalue.
4. The method for constructing a data-driven seven-DOF robotic arm digital twin as described in claim 3, characterized in that, In step 3, based on the dynamic model of the seven-degree-of-freedom robotic arm, a motion controller for the seven-degree-of-freedom robotic arm is designed. The motion controller uses a PD position controller, sets the desired trajectory of each joint angle, and uses the feedback signals of each joint position error and angular velocity error as input to achieve closed-loop motion control, as detailed below: , , , in, For positional error, For angular velocity error, For target reference position, For target reference speed, The target's current position, The target's current speed, For controller output, This is the proportionality coefficient. is the differential coefficient.
5. The method for constructing a data-driven seven-DOF robotic arm digital twin as described in claim 4, characterized in that, In step 4, the design of the excitation trajectory, i.e., the Fourier series polynomial trajectory, is as follows: , , , in, They respectively represent the first The angular position, angular velocity, and angular acceleration of each joint at time t. Indicates harmonic frequency, For the first The coefficients of the Fourier series polynomial of each joint, and the harmonic index. , Indicates the total harmonic number; To determine the coefficients of the Fourier series polynomial The condition number of the observation matrix of the linear equation of motion As the objective function, the goal is to minimize the objective function, and the following boundary conditions are added when designing the excitation trajectory. The optimization problem of the excitation trajectory is described as follows: , in, The parameter vector of the observation matrix in the excitation trajectory containing all joints of the robotic arm. The condition number under; This is a parameter vector containing the excitation trajectories of all joints of the robotic arm; Indicates the first robotic arm Fourier series parameters of each joint; and Indicates the first robotic arm The starting and ending angle positions of each joint; and Indicates the first robotic arm The initial and final angular velocities of each joint; and Indicates the first robotic arm The initial angular acceleration and the final angular acceleration of each joint; and Indicates the first robotic arm Minimum and maximum angular positions constrained by each joint; and Indicates the first robotic arm Minimum and maximum angular velocities limited by each joint; and Indicates the first robotic arm Minimum and maximum angular accelerations limited by each joint.
6. The method for constructing a data-driven seven-DOF robotic arm digital twin as described in claim 5, characterized in that, In step 4, the collected real motion data is preprocessed: First, a time-domain averaging filter is used, which means taking the time-domain average of the sampled data from multiple periods: , in, This indicates the number of times the robotic arm repeats the motion along the excitation trajectory. This refers to the sampling cycle round number; They correspond to each other in The robotic arm at the moment Sampling of the position, velocity, and joint torque of each joint The average signal value over one motion cycle; These correspond to the robotic arm in the first... Each sampling period The original sampled values of position, velocity, and joint torque at any given moment; Then, by designing a low-pass filter to eliminate the high-frequency oscillations in the sampled data, the sampled data becomes continuous and smooth. Specifically, The amplitude and frequency relationship of the Butterworth low-pass filter is as follows: , in, Let be the frequency response function of the Butterworth filter. The current sampling signal frequency, This is the cutoff frequency of the signal at -3dB. This represents the filter order.
7. The method for constructing a data-driven seven-DOF robotic arm digital twin as described in claim 6, characterized in that, In step 5, the dynamic adaptation of the iteration parameters of the hybrid adaptive particle swarm optimization algorithm includes the adaptive inertia weight of the particle swarm. Adaptive and Particle Swarm Dynamic Learning Factor The adaptive behavior is as follows: First, set the population size to... Particle dimension is In a particle swarm middle: , For the Particles It has positional components. and velocity components ,Right now: ,, Use random numbers Initialize the particle swarm position and particle swarm velocity. For particles ,have: , , Represents particles From number 1 to number Positional components of a dimension; Represents particles From number 1 to number Velocity component of dimension; Combining equations (5), (7), and (11), we set an objective function with a physical consistency penalty term. : , , in, This represents the actual observed torque. Indicates a quality penalty item. This represents the penalty term for the center-of-mass inertia tensor. Indicates the first The centroid inertia tensor penalty term for each joint. ( ) represents a function that takes the minimum value; The particle velocity update formula is: , in, Indicates the first Particle velocity in the next iteration Represents a random number between [0,1]. Indicates the first The optimal particle position for the next iteration. Indicates up to the number The global optimal particle position in the next iteration. Indicates the current particle position. Indicates adaptive inertia weights, Represents the dynamic learning factor; The formula for updating particle positions is: , Adaptive inertia weights for hybrid adaptive particle swarm optimization The expression is: , in, and These represent the maximum and minimum weights, respectively. This represents the average fitness of all particles iterated up to the current generation. This represents the globally optimal particle that has been iterated up to the current generation. This represents the fitness function value of the current particle; Dynamic learning factor of hybrid adaptive particle swarm optimization The adaptive expression is: , , , in, Represents the global learning factor. Represents the local learning factor. This indicates the current particle swarm iteration number. The maximum number of iterations, This is an intermediate function; Adaptive inertia weights and dynamic learning factors are used to continuously iterate the particle swarm in terms of velocity and position using equations (26) and (27) until the objective function is achieved. If the change in value is less than the preset convergence value or the maximum number of iterations is reached, iteration stops. At this point, the particle corresponding to the objective function... For all independent dynamic parameter vectors of the robotic arm .
8. The method for constructing a data-driven seven-DOF robotic arm digital twin as described in claim 7, characterized in that, In step 7, a simulation model of a seven-degree-of-freedom (DOF) robotic arm digital twin is constructed in Gazebo using the ROS system based on the 3D model of the CAD assembly and the corresponding dynamic model. The simulation model is then used to visualize the motion and twin data of the digital twin. The 3D model of the seven-DOF robotic arm CAD assembly is imported into Gazebo, and the parameters of the seven-DOF robotic arm digital twin are set according to the hybrid adaptive particle swarm parameter identification of the real robotic arm. The twin data of the digital twin and the observation data of the sensors are visualized in real time through the rqt plugin in ROS, and the operation data of the seven-DOF robotic arm digital twin is monitored in real time, realizing the virtual-real mapping of the seven-DOF robotic arm digital twin.
Citation Information
Patent Citations
Surface multi-beam forming method based on hybrid adaptive particle swarm optimization
CN111224706A
Digital twin-driven mechanical arm modeling, control and monitoring integrated system
CN111496781A