Joint identification method of surgical robot dynamics parameters and friction parameters, robot, device, medium and program product

CN122696296BActive Publication Date: 2026-10-20HANGZHOU WISEKING MEDICAL ROBOT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611185734.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-06
Publication Date
2026-10-20
Estimated Expiration
2046-08-06

AI Technical Summary

Technical Problem

[0005]针对现有技术存在的不足,本申请提供一种手术机器人动力学参数与摩擦参数联合辨识方法、机器人、设备、介质及程序产品,至少用以解决现有技术现有手术机器人参数辨识过程中,关节运动时序特征难以有效转化为具有物理可行性的参数辨识结果的问题

Benefits of technology

[0021]与现有技术相比,本申请实施例提供的方案中,通过将包含待辨识摩擦参数的非线性摩擦模型嵌入手术机器人的刚体动力学方程中,构建同时包含待辨识动力学参数集和待辨识摩擦参数的联合动力学模型,使动力学参数和摩擦参数能够在同一关节力矩预测关系下参与联合辨识,从而避免动力学参数辨识与摩擦参数辨识分步进行所导致的模型不一致问题,并有利于提高复杂摩擦特性参与关节力矩预测时的表达准确性。通过根据关节运动数据和关节力矩实测值构建时序训练样本,并利用混合时序参数辨识模型提取局部时序动态特征和全局时序依赖特征,使模型能够同时表征相邻采样时刻之间的运动变化关系以及跨采样时刻的时序关联关系,提高了联合参数预测值对手术机器人关节运动时序特征的表达能力。通过将联合参数预测值和关节运动数据回代至联合动力学模型得到关节力矩预测值,并基于力矩预测误差和物理约束项构建训练损失函数,可以在提高关节力矩预测一致性的同时,对联合参数预测值的物理可行性进行约束,避免仅以力矩误差收敛为目标而导致参数缺乏物理合理性的问题。由此,本申请能够在同一训练框架下协同优化动力学参数集和摩擦参数,提升了参数辨识结果与关节力矩预测关系之间的一致性,并使辨识得到的动力学参数集和摩擦参数更适用于手术机器人关节驱动力矩的前馈补偿控制。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122696296B_ABST
    Figure CN122696296B_ABST
Patent Text Reader

Abstract

The application provides a surgical robot dynamics parameter and friction parameter joint identification method, a robot, equipment, a medium and a program product. The method comprises the following steps: embedding a nonlinear friction model containing a to-be-identified friction parameter into a rigid body dynamics equation to construct a joint dynamics model; constructing a time sequence training sample according to joint motion data and measured joint torque values collected in a running process of an excitation track; inputting the time sequence training sample into a mixed time sequence parameter identification model to extract local time sequence dynamic characteristics and global time sequence dependent characteristics, and outputting joint parameter prediction values; obtaining joint torque prediction values based on the joint dynamics model, and training the mixed time sequence parameter identification model in combination with torque prediction errors and physical constraint terms; and determining the trained joint parameter prediction values as a dynamics parameter set and a friction parameter, which are used for feedforward compensation control. The application improves the consistency of joint identification of dynamics parameters and friction parameters and the accuracy of feedforward compensation control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical robot control technology, and in particular to a method for joint identification of dynamic parameters and friction parameters of a surgical robot, as well as a robot, equipment, medium, and program product. Background Technology

[0002] Minimally invasive surgical robots typically employ a master-slave control structure, with the slave robotic arm driving surgical instruments to perform delicate operations such as suturing, clamping, traction, and cutting. To ensure the slave robotic arm accurately follows the master's commands and maintains stable response during low-speed dragging, force-controlled hovering, variable-speed movement, and zero-crossing reversals, the control system usually needs to compensate for dynamic resistances such as inertial forces, Coriolis forces, gravity, and joint friction based on a robot dynamics model. The dynamic parameters and friction parameters in the robot dynamics model directly affect the joint torque prediction results and the accuracy of feedforward compensation.

[0003] Existing robot parameter identification methods typically collect joint motion and torque data based on excitation trajectories, and combine linearized dynamic equations, friction models, least squares, optimization algorithms, or neural network models for parameter estimation or torque prediction. However, in operational scenarios such as low-speed micro-motion, frequent start-stop, and zero-crossing reversal of minimally invasive surgical robots, joint friction and dynamic response exhibit strong nonlinearity, velocity dependence, and temporal correlation. Existing methods usually focus on the convergence of torque errors corresponding to the sampled data, or use joint torque and error compensation as neural network outputs. The local dynamic changes and cross-time step correlations in the joint motion sequence are difficult to effectively transform into physical parameters that can be substituted back into the dynamic equations, and the physical rationality of the parameters and the accuracy of torque prediction are difficult to balance in a unified identification process.

[0004] Therefore, how to combine the joint motion timing characteristics of minimally invasive surgical robots, and coordinate the physical rationality constraints of parameters and the accuracy of joint torque reconstruction during the unified identification process, in order to achieve high-precision joint identification of dynamic parameters and nonlinear friction parameters, has become a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this application provides a method, robot, device, medium, and program product for the joint identification of dynamic parameters and friction parameters of a surgical robot, which at least solves the problem that joint motion timing characteristics are difficult to effectively convert into physically feasible parameter identification results during the parameter identification process of existing surgical robots.

[0006] To achieve the above objectives and other advantages, some embodiments of this application provide the following aspects:

[0007] In a first aspect, some embodiments of this application provide a method for jointly identifying the dynamic parameters and friction parameters of a surgical robot, including:

[0008] A nonlinear friction model containing the friction parameters to be identified is embedded into the rigid body dynamics equations of the surgical robot to construct a joint dynamics model containing the set of dynamic parameters to be identified and the friction parameters to be identified.

[0009] Acquire joint motion data and measured joint torque values ​​collected during the operation of the surgical robot according to the excitation trajectory, and construct time-series training samples based on the joint motion data and measured joint torque values;

[0010] The time-series training samples are input into the hybrid time-series parameter identification model. The hybrid time-series parameter identification model extracts local time-series dynamic features and global time-series dependency features based on the joint motion data, and outputs joint parameter prediction values. The joint parameter prediction values ​​include the prediction values ​​of the set of dynamic parameters to be identified and the prediction values ​​of the friction parameters to be identified.

[0011] The predicted values ​​of the joint parameters and the joint motion data are input into the joint dynamics model to obtain the predicted values ​​of the joint torque. Based on the torque prediction error between the predicted values ​​of the joint torque and the measured values ​​of the joint torque, as well as the physical constraint terms corresponding to the predicted values ​​of the joint parameters, a training loss function is constructed to train the hybrid temporal parameter identification model until the training loss function meets the preset convergence condition.

[0012] The joint parameter prediction values ​​output by the trained hybrid temporal parameter identification model are determined as the dynamic parameter set and friction parameters of the surgical robot, so as to perform feedforward compensation control on the joint driving torque of the surgical robot.

[0013] Secondly, some embodiments of this application also provide an electronic device, the electronic device comprising:

[0014] One or more processors; and a memory storing computer program instructions, which, when executed, cause the processors to perform the joint identification method for surgical robot dynamic parameters and friction parameters as described above.

[0015] Thirdly, some embodiments of this application also provide a computer-readable storage medium having a computer program and / or instructions stored thereon, wherein the computer program and / or instructions, when executed by a processor, implement the joint identification method for surgical robot dynamic parameters and friction parameters as described above.

[0016] Fourthly, some embodiments of this application also provide a computer program product, including a computer program and / or instructions, which, when executed by a processor, implement the joint identification method for surgical robot dynamic parameters and friction parameters as described above.

[0017] Fifthly, some embodiments of this application also provide a surgical robot, including: a robotic arm, a joint drive unit, a data acquisition unit, and a controller;

[0018] The robotic arm includes multiple joints, and the joint drive unit is connected to the multiple joints to drive the movement of the multiple joints;

[0019] The data acquisition unit is used to collect joint motion data and measured joint torque values ​​of the robotic arm during its operation according to the excitation trajectory.

[0020] The controller is connected to the joint drive unit and the data acquisition unit. The controller is used to execute the joint identification method of surgical robot dynamic parameters and friction parameters as described above, so as to obtain the set of dynamic parameters and friction parameters of the surgical robot, and to perform feedforward compensation control on the joint drive torque of the surgical robot.

[0021] Compared with existing technologies, the solution provided in this application embeds a nonlinear friction model containing the friction parameters to be identified into the rigid body dynamics equations of the surgical robot, constructing a joint dynamic model that simultaneously includes the set of dynamic parameters to be identified and the friction parameters to be identified. This allows the dynamic parameters and friction parameters to participate in joint identification under the same joint torque prediction relationship, thereby avoiding the model inconsistency problem caused by the separate identification of dynamic parameters and friction parameters, and improving the accuracy of the expression when complex friction characteristics are involved in joint torque prediction. By constructing time-series training samples based on joint motion data and measured joint torque values, and using a hybrid time-series parameter identification model to extract local time-series dynamic features and global time-series dependency features, the model can simultaneously characterize the motion change relationship between adjacent sampling times and the time-series correlation relationship across sampling times, improving the ability of the joint parameter prediction values ​​to express the time-series features of the surgical robot joint motion. By substituting the joint parameter predictions and joint motion data back into the joint dynamics model to obtain the joint torque predictions, and constructing a training loss function based on the torque prediction error and physical constraints, the consistency of joint torque predictions can be improved while constraining the physical feasibility of the joint parameter predictions. This avoids the problem of parameters lacking physical rationality due to focusing solely on torque error convergence. Therefore, this application can collaboratively optimize the dynamic parameter set and friction parameters within the same training framework, improving the consistency between the parameter identification results and the joint torque prediction relationship, and making the identified dynamic parameter set and friction parameters more suitable for feedforward compensation control of the joint drive torque of surgical robots. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other implementation methods can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart illustrating a method for jointly identifying the dynamic parameters and friction parameters of a surgical robot according to an embodiment of this application.

[0024] Figure 2 This is a schematic diagram of the joint coordinate system of the surgical robot arm provided in the embodiments of this application;

[0025] Figure 3 This is a schematic diagram of the hybrid timing parameter identification model structure provided in the embodiments of this application;

[0026] Figure 4 This is a schematic diagram comparing the predicted joint torque with the measured torque provided in the embodiments of this application;

[0027] Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0029] Some embodiments of this application relate to a method for jointly identifying the dynamic parameters and friction parameters of a surgical robot. This method can be applied to scenarios involving parameter calibration, control parameter updating, or feedforward compensation control parameter acquisition for surgical robots. The surgical robot may include multiple joints driven by joint drive units. This method can be executed by a surgical robot controller, calibration equipment, a host computer, or an electronic device communicatively connected to the surgical robot. During implementation, the surgical robot can run according to an excitation trajectory, and corresponding joint motion data and measured joint torque values ​​can be collected to jointly identify the dynamic parameters and friction parameters of the surgical robot based on the collected data. (Refer to...) Figure 1 As shown, this application may include the following steps:

[0030] Step S1: Embed the nonlinear friction model containing the friction parameters to be identified into the rigid body dynamics equations of the surgical robot to construct a joint dynamics model containing the set of dynamic parameters to be identified and the friction parameters to be identified.

[0031] In some embodiments, a surgical robot may include multiple joints and links connected in sequence, each joint being driven by a corresponding joint drive unit. To establish the rigid body dynamics equations of the surgical robot, the kinematic relationships between the joints can first be determined based on the robotic arm structure. (Refer to...) Figure 2 As shown, Figure 2 This is a schematic diagram of the joint coordinate system of the surgical robot arm provided in an embodiment of this application. Figure 2 Taking a surgical robot arm including joint 1, joint 2, joint 3 and joint 4 as an example, joint 1, joint 2, joint 3 and joint 4 represent different motion joints connected in sequence in the robot arm. Each joint can drive the adjacent links to produce relative motion. Figure 2In the diagram, X1, Z1, X2, Z2, X3, Z3, X4, and Z4 represent the coordinate axis directions in the joint coordinate system associated with the corresponding joint or link. Here, Xi represents the X-axis direction of the i-th joint coordinate system, Zi represents the Z-axis direction of the i-th joint coordinate system, and i is a positive integer. For illustrative purposes, Figure 2 The diagram mainly shows the X-axis and Z-axis directions of each joint coordinate system. Other coordinate axis directions, which are not shown, can be determined according to the coordinate system definition rules.

[0032] based on Figure 2 The connection relationships between joints 1 to 4, the coordinate axis directions of each joint coordinate system, and the relative positions and orientations between adjacent joint coordinate systems can be used to determine the kinematic structural parameters of the surgical robot. These kinematic structural parameters may include at least one of the following: pose transformation relationships between adjacent joint coordinate systems, link lengths, joint axis directions, and joint offset parameters. Furthermore, a kinematic model of the surgical robot can be established based on these kinematic structural parameters, and by combining joint positions, joint velocities, and joint accelerations, rigid body dynamics equations containing the dynamic parameters to be identified can be established.

[0033] It should be noted that, Figure 2 The example shown is a four-joint robotic arm, illustrating the joint coordinate system setup of the surgical robot arm. In other embodiments, the surgical robot arm may include more or fewer joints, and the specific number of joints does not constitute a limitation on the scope of protection of this application.

[0034] In a preferred embodiment, step S1 specifically includes:

[0035] Step S101: Based on the kinematic structural parameters of the surgical robot, establish rigid body dynamic equations containing the dynamic parameters to be identified, and perform parameter linearization on the rigid body dynamic equations.

[0036] Specifically, in determining Figure 2 After setting up the joint coordinate system as shown, a kinematic model of the surgical robot arm can be established based on the pose transformation relationship between adjacent joint coordinate systems. For any sampling moment, the joint position, joint velocity, and joint acceleration of each joint can be obtained, and the angular velocity, angular acceleration, and centroidal acceleration of each link can be determined based on the recursive relationship between the joint coordinate systems.

[0037] Furthermore, based on the mass, center of mass position, and inertia tensor of each link, the inertial force and inertial torque corresponding to each link in its current motion state can be calculated. Then, based on the inertial force and inertial torque, a dynamic recursion is performed along the joint chain of the robotic arm to establish a rigid body dynamics equation characterizing the joint motion state and the correspondence between the dynamic parameters to be identified and the joint rigid body dynamic torque. The joint rigid body dynamic torque is used to characterize the joint torque component formed by the combined action of the inertial term, Coriolis force or centrifugal force term, and gravity term, without considering joint friction torque.

[0038] In some embodiments, the rigid body dynamics equations can be established using a Newton-Euler recursive approach. Specifically, the velocity and acceleration of each link can be calculated recursively from the robot arm base to the end effector, and then the forces and moments acting on each link can be calculated recursively from the end effector to the base. The stresses and moments are then projected onto the axes of each joint to obtain the rigid body dynamics moment expressions for each joint. The rigid body dynamics moment expressions for each joint collectively constitute the rigid body dynamics equations of the surgical robot.

[0039] After establishing the rigid body dynamics equations, they can be parametrically linearized. This parametric linearization does not simplify the surgical robot's motion into a linear process, but rather transforms the rigid body dynamics equations into a linear expression of the dynamic parameters to be identified. For example, known terms related to joint position, joint velocity, and joint acceleration can be organized into a dynamic regression matrix, while unknown parameters such as link mass, center of mass position, inertia tensor, and equivalent moment of inertia can be organized into a vector of dynamic parameters to be identified. This allows the rigid body dynamics equations to be expressed as the product of the dynamic regression matrix and the vector of dynamic parameters to be identified. Therefore, the parametrically linearized rigid body dynamics equations can be used to express the contribution of the dynamic parameters to the joint's rigid body dynamic torque, given joint position, joint velocity, and joint acceleration.

[0040] Step S102: Redundant parameters are removed from the rigid body dynamics equations after parameter linearization to obtain the minimum set of dynamic parameters to be identified.

[0041] Specifically, after parameter linearization, the rigid body dynamics equations may contain numerous dynamic parameters. Due to limitations imposed by the robotic arm structure, joint motion patterns, and excitation trajectories, some dynamic parameters may exhibit linear correlations or coupling relationships, preventing independent identification based on collected joint motion and torque data. To reduce the dimensionality of the parameters to be identified and improve identification stability, redundant parameters can be removed from the parameter-linearized rigid body dynamics equations.

[0042] In some embodiments, an observation matrix can be constructed based on the dynamic regression matrix corresponding to multiple sampling times, and matrix decomposition or rank analysis can be performed on the observation matrix. For example, QR decomposition, QR decomposition with column pivoting, or equivalent linear correlation analysis can be used to determine the linearly independent columns in the observation matrix and retain the dynamic parameters corresponding to the linearly independent columns. Redundant parameters that are linearly correlated with other parameters, whose contribution to joint torque prediction cannot be independently distinguished, or whose impact on the stability of the identification results is significant can be eliminated or merged.

[0043] After removing redundant parameters, a minimal set of dynamic parameters is obtained. This minimal set of dynamic parameters retains those that independently contribute to the prediction of joint moments, and is used to define the parameter composition corresponding to the predicted values ​​of the dynamic parameter set output by the subsequent hybrid temporal parameter identification model. This process reduces the coupling between dynamic parameters and improves the identifiability and training stability of the subsequent joint parameter predictions.

[0044] Step S103: Construct a nonlinear friction model with joint motion state as input and joint friction torque as output. The nonlinear friction model includes friction parameters to be identified to characterize the nonlinear friction characteristics during low-speed joint motion, variable-speed motion, and zero-crossing reversal.

[0045] Specifically, nonlinear friction models can be established for each joint in the surgical robot's robotic arm. The joint motion state can include joint velocity, and may further include at least one of joint position, joint acceleration, and joint motion direction information. Since the joint friction torque of a surgical robot is often not a simple linear function of velocity in scenarios such as low-speed micro-motion, variable-speed motion, and zero-crossing reversal, a nonlinear friction model can be used to characterize the nonlinear relationship between joint friction torque and joint velocity.

[0046] In some embodiments, the nonlinear friction model can be a nonlinear viscous-Stribeck friction model. This nonlinear viscous-Stribeck friction model may include a Coulomb friction term, a viscous friction term, and a Stribeck effect term. The Coulomb friction term characterizes the approximately constant frictional torque related to the joint motion direction; the viscous friction term characterizes the velocity-proportional frictional torque related to the joint velocity magnitude; and the Stribeck effect term characterizes the nonlinear variation characteristics of the transition from static friction to Coulomb friction in the low-speed region of the joint. Accordingly, the friction parameters to be identified may include at least one of the following: Coulomb friction parameters, viscous friction parameters, static friction parameters, Stribeck velocity parameters, and model parameters used to characterize the low-speed transition morphology.

[0047] In some embodiments, to reduce the discontinuous changes in the predicted friction torque when the joint velocity approaches zero or zero-crossing reversal occurs, the joint velocity direction term can be smoothed. For example, a continuously differentiable smoothed sign function can be used instead of a direct sign function, so that the nonlinear friction model remains continuously changing in the low-speed joint movement and zero-crossing reversal regions. Thus, the nonlinear friction model is more suitable for describing the complex friction characteristics of surgical robot joints during low-speed crawling, variable-speed movement, and reversal processes.

[0048] Step S104: Incorporate the joint friction torque term corresponding to the nonlinear friction model into the rigid body dynamics equation after parameter linearization and redundant parameter removal, so that the set of dynamic parameters to be identified and the friction parameters to be identified act together on the same joint torque prediction relationship, thus obtaining the joint dynamics model.

[0049] Specifically, after obtaining the minimum set of dynamic parameters and the nonlinear friction model, the rigid body dynamic torque prediction relationship between joint motion data and the set of dynamic parameters to be identified can be determined based on the rigid body dynamic equations after parameter linearization and redundant parameter removal. Furthermore, the friction torque prediction relationship between joint motion state and friction parameters to be identified can be determined based on the nonlinear friction model. For any sampling moment, a dynamic regression matrix can be constructed based on the joint position, joint velocity, and joint acceleration at that sampling moment. This dynamic regression matrix is ​​then used in conjunction with the parameter vector corresponding to the minimum set of dynamic parameters to obtain the rigid body dynamic torque prediction term. Simultaneously, the joint velocity at that sampling moment, or the joint motion state including the joint velocity, can be input into the nonlinear friction model and combined with the friction parameters to be identified to obtain the joint friction torque prediction term. Subsequently, the joint friction torque prediction term is added as an additional torque term to the rigid body dynamic torque prediction term, so that the joint torque prediction value corresponding to that sampling moment is jointly determined by the rigid body dynamic torque prediction term and the joint friction torque prediction term, thus obtaining a joint dynamic model.

[0050] Therefore, the joint dynamics model can be used to characterize the correspondence between joint motion data, the set of dynamic parameters to be identified, the friction parameters to be identified, and the predicted joint torque values. Specifically, the set of dynamic parameters to be identified is used to determine the predicted rigid body dynamic torque term, and the friction parameters to be identified are used to determine the predicted joint friction torque term; the two are uniformly correlated through the same predicted joint torque value. Thus, during subsequent training, the predicted values ​​of the dynamic parameter set and the predicted friction parameters output by the hybrid temporal parameter identification model can be uniformly substituted back into the joint dynamics model, and jointly constrained by the torque prediction error between the predicted and measured joint torque values.

[0051] In the solution provided in this embodiment, through steps S101 to S104, the rigid body dynamics equations of the surgical robot are organized into a linearized expression of the dynamic parameters to be identified. Redundant parameters are eliminated to form a minimal set of dynamic parameters, reducing the dimensionality of the parameters to be identified, decreasing coupling between dynamic parameters, and improving the stability and identifiability of parameter identification. By constructing a nonlinear friction model, the complex friction characteristics during low-speed joint motion, variable-speed motion, and zero-crossing reversal processes can be characterized, improving the accuracy of friction torque modeling. By incorporating the joint friction torque term corresponding to the nonlinear friction model into the rigid body dynamics equations, the rigid body dynamics torque prediction term and the joint friction torque prediction term act together on the same joint torque prediction relationship, forming a joint dynamics model that simultaneously includes dynamic parameters and friction parameters. Therefore, a unified physical model basis can be provided for the subsequent joint identification of dynamic and friction parameters, reducing model inconsistencies caused by step-by-step identification.

[0052] Step S2: Obtain joint motion data and measured joint torque values ​​collected during the operation of the surgical robot according to the excitation trajectory, and construct time-series training samples based on the joint motion data and measured joint torque values.

[0053] Specifically, the surgical robot can be controlled to operate according to a preset excitation trajectory, causing each joint to produce continuously changing joint motion states within a preset safety range. The excitation trajectory can be determined based on the surgical robot's joint range of motion, joint speed limits, joint acceleration limits, end-effector workspace limits, and safety obstacle avoidance constraints, so that the collected joint motion data can cover motion states such as low-speed motion, variable-speed motion, acceleration / deceleration motion, and zero-crossing reversal. By setting a trajectory with sufficient excitation, the identifiability of subsequent dynamic and frictional parameters can be improved.

[0054] During the operation of the surgical robot along the excitation trajectory, joint motion data and measured joint torque values ​​of each joint can be synchronously collected at a preset sampling frequency. The joint motion data can include at least one of the joint position, joint velocity, and joint acceleration at each sampling moment. The measured joint torque values ​​can be torque data collected by a joint torque sensor, or equivalent joint torque data calculated based on the joint drive motor current, reduction ratio, and motor torque constant. To ensure the correspondence between different data, the joint motion data and measured joint torque values ​​can be timestamped or synchronously sampled, so that the joint motion data and measured joint torque values ​​at the same sampling moment correspond to each other.

[0055] In some embodiments, the acquired joint motion data and measured joint torque values ​​can be preprocessed. Preprocessing may include at least one of filtering, noise reduction, outlier removal, time synchronization, resampling, and temporal averaging. For example, joint position data can be smoothed, and joint velocity and acceleration can be calculated based on the smoothed joint position data; measured joint torque values ​​can also be low-pass filtered to reduce the impact of sensor noise, drive current fluctuations, or mechanical vibrations on training samples. For repeatedly executed excitation trajectories, temporal averaging can also be performed on data from the same trajectory phase or the same sampling position in multiple cycles to reduce the impact of random noise on parameter identification results.

[0056] After preprocessing, the joint motion data and measured joint torque values ​​can be segmented according to a preset time window to construct multiple time-series training samples. In some embodiments, a sliding window approach can be used for segmentation, that is, multiple data segments are extracted from the continuous sampling sequence with a preset window length, and the time window is moved according to a preset step size, so that adjacent time-series training samples have a preset overlapping interval or no overlapping interval. Each time-series training sample can include joint motion data at consecutive sampling times within the corresponding time window, and establish a correspondence with the measured joint torque values ​​within the same time window. The joint motion data is used as input data for the subsequent hybrid time-series parameter identification model, and the measured joint torque values ​​are used to compare with the predicted joint torque values ​​output by the joint dynamics model during training to construct the torque prediction error.

[0057] Step S3: Input the time-series training samples into the hybrid time-series parameter identification model. The hybrid time-series parameter identification model extracts local time-series dynamic features and global time-series dependent features based on joint motion data, and outputs joint parameter prediction values. The joint parameter prediction values ​​include the prediction values ​​of the set of dynamic parameters to be identified and the prediction values ​​of the friction parameters to be identified.

[0058] In a preferred embodiment, refer to Figure 3 As shown, the hybrid temporal parameter identification model includes an input layer, a long short-term memory network layer, a Transformer encoder layer, and a fully connected layer connected sequentially along the feature propagation direction. The input layer is used to organize and transform the dimensions of joint motion data in the temporal training samples; the long short-term memory network layer is used to extract local temporal dynamic features between adjacent sampling times; the Transformer encoder layer is used to extract global temporal dependency features across sampling times; and the fully connected layer is used to map the global temporal dependency features to joint parameter prediction values. Step S3 specifically includes:

[0059] Step S301: Extract joint motion data corresponding to continuous sampling times from the time-series training samples through the input layer, and form a joint motion feature sequence based on the joint motion data.

[0060] Specifically, the temporal training samples constructed in step S2 can be input into the hybrid temporal parameter identification model. For each temporal training sample, joint motion data at consecutive sampling moments can be extracted from the corresponding time window. For surgical robots with multiple joints, the joint positions, joint velocities, and joint accelerations of multiple joints at the same sampling moment can be concatenated according to a preset joint order to form the joint motion feature vector corresponding to that sampling moment.

[0061] Furthermore, the joint motion feature vectors corresponding to multiple sampling times can be arranged in chronological order to obtain a joint motion feature sequence. This joint motion feature sequence is used to characterize the continuous joint motion state of the surgical robot within a preset time window. It should be noted that the measured joint torque values ​​in the time-series training samples should maintain a correspondence with the joint motion feature sequence and be used for subsequent comparison with the joint torque prediction values ​​output by the joint dynamics model to construct the torque prediction error.

[0062] Step S302: Recursively encode the joint motion feature sequence through a long short-term memory network layer to obtain local temporal dynamic features that characterize the relationship between joint motion changes between adjacent sampling times.

[0063] Specifically, the joint motion feature sequence generated by the input layer can be input into the Long Short-Term Memory (LSTM) network layer. The LTM network layer can recursively encode the joint motion feature sequence according to the sampling time sequence, and selectively retain and update the state changes between adjacent sampling times through input gates, forget gates, memory units, and output gates. Thus, local temporal dynamic features characterizing the trend of joint motion changes within a short time window can be extracted from the joint motion feature sequence.

[0064] In some embodiments, local temporal dynamic features may include joint velocity change trends, joint acceleration change trends, continuity of motion state between adjacent sampling times, and local dynamic change information during low-speed joint movement, acceleration / deceleration movement, or reversal movement. Since the joint motion state of a surgical robot exhibits strong continuity and short-term dependence between adjacent sampling times during low-speed micro-motion, variable-speed movement, and zero-crossing reversal, recursive encoding using a long short-term memory network layer is beneficial for enhancing the model's ability to express local dynamic change features.

[0065] Step S303: The local temporal dynamic features are positionally encoded and self-attention encoded by the Transformer encoder layer to obtain the global temporal dependency features across sampling times.

[0066] The Transformer encoder layer can use a self-attention encoding mechanism to model the correlation between local temporal dynamic features at different sampling times, obtaining global temporal dependency features across sampling times. These global temporal dependency features can be used to characterize the correlation between joint motion states over a longer period of time, such as the continuous influence between low-speed motion phases, acceleration phases, deceleration phases, and zero-crossing reversal phases.

[0067] In a preferred embodiment, the Transformer encoder layer includes multiple parallel encoding branches, which include at least a current window encoding branch and a memory state encoding branch. The current window encoding branch encodes the joint motion feature sequence of the current temporal window output by the input layer to extract the temporal correlation between different sampling times within the current temporal window. The memory state encoding branch encodes the memory state features output by the memory units in the Long Short-Term Memory (LSTM) network layer in the previous temporal window to incorporate historical motion state information from the previous temporal window. Through this parallel encoding structure, the Transformer encoder layer can simultaneously focus on the joint motion change relationships within the current temporal window and the historical memory information across temporal windows, thereby improving the expressive power of global temporal dependent features. Step S303 specifically includes:

[0068] Step S3031: Input the current temporal window joint motion feature sequence output by the input layer into the embedding layer of the current window encoding branch to obtain the current window embedding feature sequence.

[0069] Specifically, the input layer can output the joint motion feature sequence within the current temporal window in the order of sampling time. The joint motion feature sequence of the current temporal window can include joint motion feature vectors corresponding to multiple consecutive sampling times. The embedding layer of the current window encoding branch can perform feature dimension mapping on the joint motion feature sequence of the current temporal window, mapping the original joint motion features to the feature dimensions required by the Transformer encoder layer, thus obtaining the current window embedded feature sequence. Through the embedding layer processing, data from different joints and different motion dimensions can be transformed into a unified feature representation space, facilitating temporal correlation modeling by subsequent position encoding and encoder units.

[0070] Step S3032: Input the memory state features output by the memory units in the Long Short-Term Memory network layer in the previous time window into the embedding layer of the memory state encoding branch to obtain the memory state embedding feature sequence.

[0071] Specifically, after recursively encoding the joint motion feature sequence of the previous time window, the Long Short-Term Memory (LSTM) network layer can output memory state features from its memory units. These memory state features can be used to characterize the historical changes in joint motion states within the previous time window, such as the low-speed motion trend, acceleration / deceleration trends, motion continuity before and after switching, and the local dynamic relationship between adjacent sampling times.

[0072] The embedding layer of the memory state encoding branch can map the memory state features to feature dimensions, resulting in a memory state embedded feature sequence. For memory state features in vector form, they can be converted into a serialized feature representation that can be input into the Transformer encoder branch through linear mapping, dimensional expansion, or memory tag construction. This process ensures that the memory state features of the previous time window and the embedded feature sequence of the current window are in a fusionable and encodeable feature space.

[0073] Step S3033: The sampling time sequence position encoding is fused into the current window embedded feature sequence and the memory state embedded feature sequence respectively to obtain the current window encoded input feature sequence and the memory state encoded input feature sequence.

[0074] Specifically, sampling temporal position codes can be fused into the current window embedding feature sequence and the memory state embedding feature sequence, respectively. For the current window embedding feature sequence, a corresponding position code can be generated based on the time position of each sampling moment within the current temporal window, and this position code is fused with the current window embedding feature sequence to obtain the current window encoding input feature sequence. For the memory state embedding feature sequence, a corresponding position code can be generated based on the time position corresponding to the previous temporal window, the relative position of the memory state within the historical window, or a preset memory position identifier, and this position code is fused with the memory state embedding feature sequence to obtain the memory state encoding input feature sequence. Through this processing, the current window encoding branch and the memory state encoding branch can retain sampling temporal information and the relative temporal relationship between windows during subsequent encoding processes.

[0075] Step S3034: Encode the current window encoding input feature sequence through the current window encoding branch to obtain the current window temporal features.

[0076] Specifically, the current window encoding branch may include at least one encoder unit, which may include a multi-head self-attention layer, a first residual connection and normalization layer, a feedforward network layer, and a second residual connection and normalization layer. The multi-head self-attention layer is used to model the association between joint motion features corresponding to different sampling times in the current window encoding input feature sequence; the first residual connection and normalization layer is used to perform residual fusion and normalization of the attention features output by the multi-head self-attention layer and its input features; the feedforward network layer is used to perform nonlinear mapping on the normalized features; and the second residual connection and normalization layer is used to perform residual fusion and normalization of the features output by the feedforward network layer and its input features.

[0077] In some embodiments, the current window encoding input feature sequence can be input into a multi-head self-attention layer in the current window encoding branch. The multi-head self-attention layer can generate query features, key features, and value features based on the current window encoding input feature sequence, and determine attention weights between different sampling times based on the correlation between the query features and key features. Then, it performs weighted aggregation of the value features based on the attention weights to obtain the current window attention features. Since the multi-head self-attention layer includes multiple attention heads, different attention heads can model the joint motion state associations within the current temporal window from different feature subspaces, thereby capturing multidimensional temporal dependencies between different sampling times.

[0078] Furthermore, the current window attention features can be residually concatenated with the input features of the multi-head self-attention layer, and the residually concatenated features are then normalized to obtain the first normalized features. Subsequently, the first normalized features are input into the feedforward network layer, which performs a nonlinear mapping on the features corresponding to each sampling time step to enhance the expressive power of the current window features. The feedforward network layer may include at least two linear mapping layers and activation functions set between the linear mapping layers. The activation functions can be ReLU, GELU, or other nonlinear activation functions. Then, the features output by the feedforward network layer can be residually concatenated with the first normalized features and normalized to obtain the current window temporal features corresponding to the current window encoding branch.

[0079] When the current window encoding branch includes multiple encoder units, the current window temporal features output by the previous encoder unit can be used as the input of the next encoder unit. Self-attention encoding and nonlinear mapping are performed layer by layer to finally obtain the current window temporal features. The current window temporal features can be used to characterize the association of joint motion states between multiple sampling times within the current temporal window, such as the temporal dependencies of motion states such as continuous changes in joint velocity, changes in joint acceleration, low-speed micro-motion, acceleration / deceleration switching, and zero-crossing commutation within the current window.

[0080] Step S3035: Encode the memory state encoding input feature sequence through the memory state encoding branch to obtain memory-enhanced temporal features.

[0081] Specifically, the memory state encoding branch can adopt the same or corresponding encoder unit structure as the current window encoding branch to encode the memory state encoding input feature sequence. Unlike the current window encoding branch, the input of the memory state encoding branch is the encoded input feature sequence corresponding to the memory state features output by the memory units in the Long Short-Term Memory (LSTM) network layer in the previous time window. Through self-attention encoding, residual normalization, and nonlinear mapping, memory-enhanced temporal features are obtained. These memory-enhanced temporal features can be used to characterize the historical trend of joint motion states within the previous time window, as well as cross-window motion continuity information related to the current time window.

[0082] Similarly, when the memory state coding branch includes multiple encoder units, the memory state coding features output by the previous encoder unit can be used as the input of the next encoder unit for coding processing layer by layer.

[0083] Step S3036: Perform feature fusion on the current window temporal features and memory-enhanced temporal features to obtain global temporal dependency features.

[0084] Specifically, a cross-branch attention fusion approach can be used to fuse the temporal features of the current window and the temporal features of memory enhancement. Through cross-branch attention fusion, features related to the current window's motion state can be selected from the historical memory information of the previous temporal window based on the correlation between the current window's temporal features and the memory enhancement temporal features, and the selected historical memory information can be fused into the current window's temporal features.

[0085] In the solution provided in this embodiment, through steps S3031 to S3036, the current window encoding branch is used to encode the joint motion feature sequence of the current temporal window, and the memory state encoding branch is used to encode the memory state features of the previous temporal window. This can introduce historical motion state information and reduce the loss of contextual information caused by time window segmentation. By fusing the sampling temporal position encoding separately, the temporal position information corresponding to the current window features and memory state features can be retained, improving the model's ability to perceive the sampling order and the temporal relationship between windows. By fusing the current window temporal features and the memory-enhanced temporal features, a global temporal dependency feature that combines the current motion state and historical memory information can be formed. Therefore, the hybrid temporal parameter identification model can be enhanced to express complex temporal scenarios such as continuous joint motion processes, low-speed motion, variable speed motion, and zero-crossing reversal, thereby improving the accuracy of the joint parameter prediction values ​​in predicting dynamic parameters and friction parameters.

[0086] In a preferred embodiment, step S3036 specifically includes:

[0087] Step S30361: Generate query features using the current window time series features, and generate key features and value features using memory-enhanced time series features.

[0088] Specifically, the current window temporal features output from the current window encoding branch can be input into the first linear mapping layer to generate query features. The query features represent the motion state information that the current temporal window needs to focus on at each sampling time. The memory-enhanced temporal features output from the memory state encoding branch can be input into the second and third linear mapping layers respectively to generate key features and value features. The key features are used for relevance matching with the query features, while the value features provide historical memory information that can be selected and aggregated by the current window temporal features.

[0089] In some embodiments, if the feature dimensions of the current window temporal features and the memory-enhanced temporal features are different, they can be mapped to the same feature space or a feature space with computable attention relationships through linear mapping, normalization, or dimension alignment, so as to perform cross-branch attention calculations in the future.

[0090] Step S30362: Calculate the cross-branch attention weight between the current window temporal features and the memory-enhanced temporal features based on the query features and key features.

[0091] Specifically, cross-branch attention weights between the current window temporal features and the memory-enhanced temporal features can be calculated based on the similarity or correlation between the query features and the key features. These cross-branch attention weights represent the degree of attention paid by the current window features at each sampling time point within the current temporal window to different historical memory features from the previous temporal window.

[0092] For example, a dot product can be performed on the query features and key features, and the dot product result can be scaled and normalized to obtain cross-branch attention weights. This processing allows the current window's temporal features to select relevant historical motion information from memory-enhanced temporal features based on their own motion state. For instance, when the current window contains low-speed micro-motions, acceleration / deceleration changes, or zero-crossing reversal states, the cross-branch attention weights can increase the weights of memory features related to the corresponding motion trend or reversal state in the previous temporal window.

[0093] Step S30363: Weight the value features according to the cross-branch attention weights to obtain the memory-enhanced fusion features.

[0094] Specifically, based on the cross-branch attention weights obtained in step S30362, the value features can be weighted and aggregated to obtain memory-enhanced fusion features. Memory-enhanced fusion features can be understood as historical memory information selected from the memory-enhanced temporal features of the previous time-series window, based on the current window's motion state. Through weighted aggregation, it is not necessary to indiscriminately concatenate or superimpose all historical memory features into the current window features. Instead, historical memory information more relevant to the current motion state can be adaptively introduced based on the correlation between the current window's temporal features and the memory-enhanced temporal features. This reduces the interference of irrelevant historical information on the expression of the current window features and improves the utilization efficiency of cross-window historical memory information.

[0095] Step S30364: Perform residual fusion of the memory-enhanced fusion features and the current window temporal features to obtain global temporal dependency features.

[0096] Specifically, residual fusion can be performed between the memory-enhanced fusion features and the current window temporal features to obtain global temporal dependency features. In some embodiments, the memory-enhanced fusion features can be dimension-mapped to match the dimensions of the current window temporal features, and then the two can be added, weighted, or concatenated and linearly mapped. The fusion result is then normalized to obtain global temporal dependency features. Residual fusion can retain the main expression of the current motion state in the current window temporal features while introducing historical motion state information contained in the memory-enhanced fusion features. Thus, the obtained global temporal dependency features can not only represent the global dependency relationship between different sampling times within the current temporal window, but also represent the historical influence relationship of the previous temporal window on the current motion state.

[0097] In the solution provided in this embodiment, through steps S30361 to S30364, query features are generated using the current window temporal features, and key and value features are generated using memory-enhanced temporal features. This enables the establishment of a cross-branch association between the motion state of the current temporal window and the historical memory information of the previous temporal window. By weighting and aggregating the value features through cross-branch attention weights, historical context information more relevant to the current motion state can be adaptively extracted from the memory-enhanced temporal features, reducing the interference of irrelevant historical information on the expression of the current window features. Therefore, cross-window memory information can be introduced while retaining the main expression of the motion features of the current window, improving the accuracy of utilizing historical memory information in global temporal dependent features and enhancing the model's ability to express continuous motion state changes and cross-window torque response relationships.

[0098] Step S304: Map the parameter dimensions of the global temporal dependent features through a fully connected layer to obtain and output the joint parameter prediction values.

[0099] Specifically, the global temporal dependency features output from the Transformer encoder layer can be input into the fully connected layer. The fully connected layer performs non-linear mapping and parameter dimension transformation on the global temporal dependency features, matching the model output dimension with the dimension of the joint parameters to be predicted. The fully connected layer can include one or more linear mapping layers, and non-linear activation functions can be set between adjacent linear mapping layers to enhance parameter mapping capabilities. Through parameter dimension mapping by the fully connected layer, the global temporal dependency features can be converted into a joint parameter prediction vector.

[0100] The joint parameter prediction vector can be divided into dynamic parameter set prediction values ​​and friction parameter prediction values ​​according to a preset parameter arrangement order. Among them, the dynamic parameter set prediction values ​​correspond to each dynamic parameter in the minimum dynamic parameter set obtained in step S102, and are used to represent the dynamic parameters to be identified in the rigid body dynamic equation of the surgical robot; the friction parameter prediction values ​​correspond to the friction parameters to be identified in the nonlinear friction model in step S103, and are used to represent the nonlinear friction characteristics of each joint.

[0101] For surgical robots with multiple joints, the predicted friction parameters can include at least one of the following: Coulomb friction parameters, viscous friction parameters, static friction parameters, Stribeck velocity parameters, and model parameters representing low-speed transition modes for each joint. The predicted values ​​of the dynamic parameter set and the predicted friction parameters together constitute the joint parameter prediction values ​​output by the hybrid temporal parameter identification model.

[0102] In the solution provided in this embodiment, through steps S301 to S304, the joint motion data in the temporal training samples are organized into a continuous sequence of joint motion features. The joint motion feature sequence is recursively encoded using a Long Short-Term Memory (LSTM) network layer, which can extract the local dynamic changes between adjacent sampling moments, enhancing the model's ability to express short-term motion features such as low-speed motion, acceleration / deceleration changes, and zero-crossing reversals. The Transformer encoder layer further extracts global temporal dependency features, capturing the correlation between different sampling moments over a longer time range. A fully connected layer maps the global temporal dependency features to joint parameter predictions, enabling the model output to simultaneously include predicted values ​​for both dynamic parameters and friction parameters. This hybrid temporal parameter identification model can more fully utilize the local dynamic changes and global temporal correlations in the joint motion data, making the output joint parameter predictions more accurately reflect the dynamic characteristics and joint friction characteristics of the surgical robot.

[0103] Step S4: Input the joint parameter prediction values ​​and joint motion data into the joint dynamics model to obtain the joint torque prediction values. Based on the torque prediction error between the joint torque prediction values ​​and the measured joint torque values, as well as the physical constraint terms corresponding to the joint parameter prediction values, construct a training loss function. Train the hybrid temporal parameter identification model in this way until the training loss function meets the preset convergence condition.

[0104] In a preferred embodiment, step S4, which involves inputting the predicted joint parameters and joint motion data into the joint dynamics model to obtain the predicted joint torque, specifically includes:

[0105] Step S401: Based on the joint position, joint velocity, and joint acceleration in the joint motion data, construct a dynamic regression matrix to characterize the mapping relationship between rigid body dynamics terms and joint motion data.

[0106] Specifically, for any sampling time in the time-series training samples, the joint position, joint velocity, and joint acceleration corresponding to each joint at that sampling time can be obtained. Based on the parametrically linearized rigid body dynamics equations established in step S101, a dynamic regression matrix corresponding to the sampling time can be constructed according to the joint position, joint velocity, and joint acceleration. The dynamic regression matrix is ​​used to represent the mapping relationship between joint motion data and rigid body dynamic torque terms, and its matrix elements can be composed of joint position, joint velocity, joint acceleration, and related terms determined by the robot's kinematic structure. For surgical robots with multiple joints, the dynamic regression matrix can be in the form of a matrix corresponding to multiple joints, used to simultaneously describe the rigid body dynamic torque prediction relationship of multiple joints.

[0107] In some embodiments, when the time-series training samples include multiple consecutive sampling times, the dynamic regression matrix corresponding to each sampling time can be constructed separately, or the dynamic regression matrices corresponding to multiple sampling times can be combined in chronological order to obtain the time-series dynamic regression matrix corresponding to the current time-series training sample.

[0108] Step S402: Perform matrix operations on the dynamic regression matrix and the dynamic parameter set prediction values ​​of the joint parameter prediction values ​​to obtain the rigid body dynamic torque prediction components.

[0109] Specifically, the dynamic regression matrix obtained in step S401 can be used to perform matrix operations with the predicted values ​​of the dynamic parameter set obtained from the joint parameter prediction values ​​to obtain the rigid body dynamic torque prediction components. Matrix operations can be the product of the dynamic regression matrix and the predicted values ​​of the dynamic parameter set. Through this operation, the joint torque prediction components formed by rigid body dynamic factors such as robot body inertia, Coriolis force or centrifugal force, and gravity can be obtained without considering joint friction torque.

[0110] For a time-series dynamic regression matrix corresponding to multiple sampling times, the rigid body dynamic torque prediction components corresponding to each sampling time can be calculated separately, and a rigid body dynamic torque prediction sequence can be formed according to the sampling time order. This rigid body dynamic torque prediction sequence can maintain a time correspondence with the measured joint torque values ​​in the time-series training samples.

[0111] Step S403: Substitute the predicted friction parameters of the joint velocity and the predicted joint parameters into the nonlinear friction model to obtain the predicted nonlinear friction torque components.

[0112] Specifically, the joint velocity corresponding to each sampling moment can be obtained from the joint motion data, and the joint velocity and the friction parameter prediction value obtained from the joint parameter prediction value can be input into the nonlinear friction model to obtain the nonlinear friction torque prediction component.

[0113] In some embodiments, the nonlinear friction model can determine the corresponding Coulomb friction torque components, viscous friction torque components, and Stribeck effect torque components based on the magnitude and direction of the joint velocity, and combine these friction torque components into a nonlinear friction torque prediction component. For cases where the joint velocity is close to zero or undergoes a zero-crossing commutation, the nonlinear friction model can determine the friction torque change based on the smoothed velocity direction term, thereby reducing the risk of discontinuous changes in the predicted friction torque value near zero velocity.

[0114] In some embodiments, for multiple joints, the nonlinear friction torque prediction component of each joint can be calculated based on the joint velocity of each joint and the corresponding friction parameter prediction value, and the nonlinear friction torque prediction components corresponding to multiple joints can be combined into a friction torque prediction vector.

[0115] Step S404: Obtain the predicted joint torque value based on the predicted components of rigid body dynamic torque and nonlinear friction torque.

[0116] Specifically, the rigid body dynamic torque prediction component obtained in step S402 and the nonlinear friction torque prediction component obtained in step S403 can be combined to obtain the joint torque prediction value. This can include superimposing the rigid body dynamic torque prediction component and the nonlinear friction torque prediction component corresponding to the same sampling time and the same joint, so that the joint torque prediction value simultaneously reflects the rigid body dynamics effect of the robot body and the nonlinear friction effect of the joint. Therefore, for any sampling time, the joint torque prediction value can be jointly determined by the rigid body dynamic torque prediction component and the nonlinear friction torque prediction component.

[0117] When the time-series training samples include multiple sampling times, the predicted joint torque values ​​corresponding to multiple sampling times can be obtained in the order of sampling time, thus forming a joint torque prediction sequence. This joint torque prediction sequence can be aligned with the measured joint torque value sequence and used for subsequent calculation of torque prediction error.

[0118] In the solution provided in this embodiment, through steps S401 to S404, a dynamic regression matrix is ​​constructed based on joint position, joint velocity, and joint acceleration. This matrix is ​​then used in matrix operations with the predicted values ​​of the dynamic parameter set. This allows the predicted values ​​of the dynamic parameter set to participate in joint torque prediction in a manner consistent with rigid body dynamics equations. By substituting the predicted values ​​of joint velocity and friction parameters into the nonlinear friction model, the predicted values ​​of friction parameters can be used to characterize the changes in friction torque during low-speed joint motion, variable-speed motion, and zero-crossing reversal. By using both the rigid body dynamic torque prediction components and the nonlinear friction torque prediction components to determine the predicted values ​​of joint torque, the dynamic parameters and friction parameters can be uniformly substituted and constrained in the same joint dynamics model. Therefore, the physical consistency and interpretability of the predicted joint torque values ​​are improved, enabling subsequent model training based on the joint torque prediction error to simultaneously constrain the predicted values ​​of the dynamic parameter set and the friction parameters, thereby improving the accuracy and stability of joint parameter identification.

[0119] In a preferred embodiment, step S4, which involves constructing a training loss function based on the torque prediction error between the predicted and measured joint torque values ​​and the physical constraint terms corresponding to the joint parameter prediction values, specifically includes:

[0120] Step S405: Construct a torque prediction error term based on the torque prediction error between the predicted joint torque value and the measured joint torque value.

[0121] Specifically, after obtaining the predicted joint torque values, the predicted joint torque values ​​can be compared with the measured joint torque values ​​at the same sampling time to obtain the torque prediction error. For surgical robots with multiple joints, the torque prediction error for each joint can be calculated separately, and the torque prediction errors for multiple joints can be summarized to obtain the torque prediction error at the current sampling time.

[0122] When the time-series training samples include multiple consecutive sampling times, the torque prediction error corresponding to each sampling time can be calculated separately, and a torque prediction error term can be constructed based on the torque prediction errors of multiple sampling times. For example, the torque prediction error term can be represented by the mean square error, mean absolute error, or weighted mean square error between the predicted and measured joint torque values. The weighted mean square error can be assigned corresponding weights based on the importance of different joints, the torque range, or the motion stage to which the sampling time belongs.

[0123] By using the torque prediction error term, the joint parameter prediction values ​​output by the hybrid time-series parameter identification model can be constrained to obtain joint torque prediction values ​​that match the actual sampled torques after being substituted back into the joint dynamics model.

[0124] Step S406: Based on the degree of deviation between the predicted values ​​of the dynamic parameter set in the joint parameter prediction values ​​and the preset physical feasibility conditions of the dynamic parameters, construct the physical feasibility constraints of the dynamic parameters. The preset physical feasibility conditions of the dynamic parameters include at least one of the following: non-negative mass condition, positive definite inertial tensor condition, and bounded center of mass position condition.

[0125] Specifically, the predicted values ​​of the dynamic parameter set can be parsed from the predicted values ​​of the joint parameters, and the mass parameters, center of mass position parameters, and inertia tensor parameters corresponding to each link can be determined based on these predicted values. Subsequently, it can be determined whether the predicted values ​​of the dynamic parameter set meet the preset physical feasibility conditions for the dynamic parameters. Specifically, the non-negative mass condition is used to constrain the mass parameters of each link to be no less than a preset lower mass limit, avoiding the model output of physically meaningless negative mass parameters; the positive definiteness condition of the inertia tensor is used to constrain the inertia tensor corresponding to each link to meet the positive definiteness requirement, avoiding the output of inertia parameters that do not conform to the physical properties of rigid body rotational inertia; and the bounded center of mass position condition is used to constrain the center of mass position of each link to be within the preset geometric range or reasonable installation range of the corresponding link, avoiding deviation of the center of mass position from the actual mechanical structure.

[0126] In some embodiments, penalty terms can be constructed based on the degree of deviation of the predicted values ​​of the dynamic parameter set from the aforementioned physical feasibility conditions. For example, when the mass parameter is less than a preset lower mass limit, a mass constraint penalty can be constructed based on the difference between the mass parameter and the preset lower mass limit; when the inertia tensor does not meet the positive definiteness condition, an inertia tensor constraint penalty can be constructed based on the degree of deviation between the eigenvalues ​​of the inertia tensor and a preset positive definite threshold; when the centroid position exceeds a preset bounded range, a centroid position constraint penalty can be constructed based on the cross-boundary distance between the centroid position and the corresponding boundary. By weighting and combining one or more of the above penalty terms, a physical feasibility constraint term for the dynamic parameters can be obtained.

[0127] This constraint reduces the risk of hybrid time-series parameter identification models simply pursuing torque error convergence and outputting non-physical dynamic parameters, thus ensuring that the predicted values ​​of the dynamic parameter set maintain physical rationality while improving the accuracy of torque prediction.

[0128] Step S407: Based on the geometric metric relationship between the predicted values ​​of the dynamic parameter set and the preset physical feasible parameter domain, construct a geometric metric constraint term. The geometric metric constraint term is used to constrain the predicted values ​​of the dynamic parameter set to be located within the feasible region inside the preset physical feasible parameter domain.

[0129] Specifically, a pre-defined physically feasible parameter domain can be constructed based on the non-negativity of mass, the positive definiteness of the inertia tensor, the boundedness of the center of mass position, and other dynamic parameter constraints related to the robot structure. The pre-defined physically feasible parameter domain is used to represent the range of parameters that are physically allowed to exist for the dynamic parameters.

[0130] In some embodiments, a geometric metric relationship can be calculated between the predicted values ​​of the dynamic parameter set and the boundary of a preset physical feasible parameter domain, and a geometric metric constraint term can be constructed based on the geometric metric relationship. The geometric metric relationship may include the distance from the predicted values ​​of the dynamic parameter set to the boundary of the physical feasible parameter domain, the distance to an internal reference point, the distance relative to the boundary safety margin, or a metric used to characterize whether the predicted values ​​of the dynamic parameter set are close to the edge of the feasible domain.

[0131] When the predicted value of the dynamic parameter set is outside the preset physical feasible parameter domain, a penalty term can be constructed based on its out-of-bounds distance to the feasible domain boundary. When the predicted value of the dynamic parameter set is inside the preset physical feasible parameter domain but too close to the boundary, a penalty term can be constructed based on the degree of insufficient safety margin between it and the boundary. Thus, the geometric metric constraint term can not only constrain the predicted value of the dynamic parameter set to meet the basic physical feasibility conditions, but also guide it away from the edge of the physical feasible parameter domain and into a more stable internal feasible region.

[0132] By using geometric metric constraints, the instability of parameters caused by predicted values ​​of the dynamic parameter set falling into the edge of the physically feasible solution set can be reduced, thereby improving the robustness and generalization ability of the dynamic parameter identification results.

[0133] Step S408: Construct a training loss function based on the torque prediction error term, the physical feasibility constraint term of the dynamic parameters, and the geometric metric constraint term.

[0134] Specifically, the torque prediction error term obtained in step S405, the physical feasibility constraint term for dynamic parameters obtained in step S406, and the geometric metric constraint term obtained in step S407 can be weighted and combined to obtain the training loss function. For example, the training loss function may include a main loss term and a regularization constraint term, wherein the torque prediction error term serves as the main loss term, used to constrain the degree of matching between the predicted and measured values ​​of the joint torque; the physical feasibility constraint term for dynamic parameters and the geometric metric constraint term serve as regularization constraint terms, used to constrain the physical rationality and internal feasibility of the predicted values ​​of the dynamic parameter set.

[0135] In some embodiments, after constructing the training loss function, a dataset can be formed based on the time-series training samples constructed in step S2, and the dataset can be divided into a training set, a validation set, and a test set. The training set is used to iteratively update the model parameters of the hybrid time-series parameter identification model; the validation set is used to evaluate the generalization performance of the model during training and to help determine whether the training has converged; and the test set is used to evaluate the identification accuracy of dynamic parameters and friction parameters after training is completed.

[0136] During training, temporal training samples from the training set can be input into a hybrid temporal parameter identification model to obtain joint parameter predictions. These joint parameter predictions, along with corresponding joint motion data, are then input into a joint dynamics model to obtain joint torque predictions. Subsequently, a torque prediction error term, serving as the main loss term, can be constructed based on the mean square error between the predicted and measured joint torque values ​​obtained from actual sampling. Furthermore, a physical feasibility constraint term and a geometric metric constraint term for the dynamic parameters are superimposed to obtain the training loss function.

[0137] In some embodiments, the AdamW optimizer can be used to iteratively update the model parameters of the hybrid temporal parameter identification model. Specifically, the learning rate, weight decay parameter, first-moment decay coefficient, and second-moment decay coefficient can be set. The weight decay parameter is used to regularize the model weights to reduce the risk of overfitting; the first-moment decay coefficient controls the influence of the historical gradient mean on the current parameter update direction; and the second-moment decay coefficient controls the influence of the historical gradient square mean on the current parameter update step size. Through these optimization strategies, the stability and convergence of the model training process can be improved.

[0138] After each or every several iterations, the current hybrid temporal parameter identification model can be validated using a validation set. The mean square error, matching degree, or other identification accuracy metrics between the predicted and measured joint torque values ​​on the validation set can be calculated. If the training loss function is less than a preset loss threshold, the torque prediction error on the validation set no longer decreases significantly, the change in loss over multiple consecutive iterations is less than a preset change threshold, or the preset number of training iterations is reached, then the training loss function can be determined to meet the preset convergence condition, and training can be stopped.

[0139] After training, the trained hybrid temporal parameter identification model can be evaluated using a test set. Specifically, joint motion data from the test set can be input into the trained hybrid temporal parameter identification model to obtain joint parameter predictions. Joint torque predictions are then calculated based on the joint dynamics model. These predictions are compared with the corresponding measured joint torque values ​​in the test set to obtain evaluation metrics such as matching degree and mean square error. This evaluation process determines the accuracy of the trained hybrid temporal parameter identification model in identifying the surgical robot's dynamic and frictional parameters and verifies whether the joint parameter predictions accurately reflect the actual joint torque response.

[0140] Step S5: The joint parameter prediction values ​​output by the trained hybrid temporal parameter identification model are determined as the dynamic parameter set and friction parameters of the surgical robot, so as to perform feedforward compensation control on the joint driving torque of the surgical robot.

[0141] Specifically, after the hybrid temporal parameter identification model is trained, it can be used as the parameter identification model for the surgical robot. The collected joint motion data can be input into the trained hybrid temporal parameter identification model, which then outputs joint parameter prediction values. These joint parameter prediction values ​​can be analyzed according to a preset parameter arrangement to obtain the predicted values ​​for the dynamic parameter set and friction parameters. The predicted values ​​for the dynamic parameter set can be determined as the dynamic parameter set of the surgical robot, and the predicted values ​​for the friction parameters can be determined as the friction parameters of the surgical robot.

[0142] For the joint parameter predictions obtained from multiple time-series training samples or multiple test samples, the joint parameter predictions that meet the preset identification accuracy conditions can be averaged, weighted averaged, or stability-filtered. The processed dynamic parameter set predictions and friction parameter predictions are then used as the final identified dynamic parameter set and friction parameters. The preset identification accuracy conditions may include at least one of the following: the mean square error of torque prediction is less than a preset error threshold, the torque matching degree is greater than a preset matching threshold, or the fluctuation amplitude of the parameter prediction values ​​corresponding to multiple consecutive samples is less than a preset fluctuation threshold.

[0143] After determining the dynamic parameter set and friction parameters of the surgical robot, these parameters can be configured into the robot's feedforward compensation controller. The feedforward compensation controller, located within the surgical robot's control system, is used to pre-calculate the feedforward compensation amount of the joint driving torque based on the target joint motion state when the surgical robot executes the target motion trajectory. The target joint motion state can include the target joint position, target joint velocity, and target joint acceleration. Specifically, during the operation of the surgical robot, a dynamic regression matrix can be constructed based on the target joint position, target joint velocity, and target joint acceleration. Based on this dynamic regression matrix and the identified dynamic parameter set, the rigid body dynamic feedforward torque is calculated. Further, the target joint velocity, or the target joint motion state including the target joint velocity, can be input into a nonlinear friction model, and combined with the identified friction parameters, the friction compensation torque can be calculated. Subsequently, the feedforward compensation amount of the joint driving torque can be generated based on the rigid body dynamic feedforward torque and the friction compensation torque.

[0144] In some embodiments, the feedforward compensation amount can be superimposed with the feedback control amount output by the feedback controller to obtain the joint driving torque command, and the corresponding joint drive unit can be controlled to operate based on the joint driving torque command. The feedback control amount can be determined based on the deviation between the target joint motion state and the actual joint motion state, while the feedforward compensation amount is used to compensate for robot body dynamics effects and joint friction effects in advance. This can reduce tracking errors caused by factors such as inertia, gravity, and friction when relying solely on feedback control.

[0145] In some embodiments, the feedforward compensation controller can invoke the identified set of dynamic parameters and friction parameters in control scenarios such as low-speed dragging, fine positioning, hovering, or zero-crossing reversal. Since the friction parameters can characterize the nonlinear friction characteristics of joints during low-speed movement, variable-speed movement, and zero-crossing reversal, the friction compensation torque calculated based on these friction parameters can more accurately compensate for the effects of joint friction, reducing problems such as joint reversal hysteresis, unstable low-speed crawling, or hovering jitter.

[0146] Reference Figure 4 As shown, Figure 4 This is a schematic diagram comparing the predicted joint torque value with the measured joint torque value provided in the embodiments of this application. Figure 4The top row of figures shows the comparison results of joint torques for joints 2, 3, and 4, respectively, while the bottom row shows the torque prediction errors for joints 2, 3, and 4, respectively. The horizontal axis represents time, and the vertical axis represents joint torque or torque prediction error. The curve corresponding to the hybrid temporal parameter identification model represents the joint torque prediction value obtained after inputting the joint parameter prediction value output by the trained hybrid temporal parameter identification model into the joint dynamics model. The curve corresponding to the weighted least squares method represents the joint torque prediction value obtained after substituting the parameters identified by the weighted least squares method back into the dynamics model. The curve corresponding to the measured joint torque value represents the joint torque actually collected during the operation of the surgical robot according to the excitation trajectory.

[0147] Depend on Figure 4 It can be seen that for joints 2 and 3, the predicted joint torque values ​​obtained based on the hybrid temporal parameter identification model of this application have a high degree of overlap with the measured joint torque values, and the corresponding torque prediction errors generally fluctuate around zero. For joint 4, although the joint torque variation trend is more complex and the torque prediction error fluctuation is relatively more obvious, the error curve corresponding to the hybrid temporal parameter identification model is still relatively concentrated overall. Compared with the weighted least squares method, the hybrid temporal parameter identification model of this application can make fuller use of the local temporal dynamic features and global temporal dependency features in the joint motion data, so that the predicted joint torque values ​​better follow the measured joint torque values, thereby verifying the effectiveness of the joint identification results of the dynamic parameter set and friction parameters.

[0148] In some embodiments, the identified set of dynamic parameters and friction parameters can be applied to the circular arc suture trajectory tracking control of the surgical robot. Specifically, when the surgical robot is running along a preset circular arc suture trajectory, the feedforward compensation controller can calculate the feedforward compensation amount of the joint driving torque based on the target joint position, target joint velocity, and target joint acceleration, combined with the identified set of dynamic parameters and friction parameters. Since the feedforward compensation amount takes into account both the robot's body dynamics and the joint's nonlinear friction effect, it can reduce the impact of changes in inertia, gravity, and friction torque on trajectory tracking accuracy during joint speed changes and zero-crossing reversals, enabling the surgical robot to follow the desired trajectory more stably.

[0149] In some embodiments, the identified set of dynamic parameters and friction parameters can also be applied to force-controlled dragging and hovering scenarios of the surgical robot. During force-controlled dragging, the feedforward compensation calculated based on the identified parameters can compensate for the resistance torque during joint movement, thereby reducing the equivalent resistance felt by the operator when dragging the robotic arm. During hovering, the gravity compensation and friction compensation calculated based on the identified parameters can reduce joint torque compensation errors, thereby reducing the shaking or drift of the robotic arm during hovering and improving hovering stability.

[0150] Therefore, this application obtains the dynamic parameter set and friction parameters through a hybrid time-series parameter identification model, and uses them for feedforward compensation control of joint driving torque. This can improve the control accuracy and operational stability of minimally invasive surgical robots in scenarios such as fine trajectory tracking, speed change and direction reversal, force-controlled dragging and hovering, and provide a parameter basis for the precise control of minimally invasive surgical robots.

[0151] In summary, the method for joint identification of dynamic and friction parameters of a surgical robot provided in this application embeds a nonlinear friction model containing the friction parameters to be identified into the rigid body dynamics equations of the surgical robot. This constructs a joint dynamic model that simultaneously includes the set of dynamic parameters to be identified and the friction parameters to be identified. This allows the dynamic and friction parameters to participate in joint identification under the same joint torque prediction relationship, thus avoiding the model inconsistency problem caused by performing dynamic and friction parameter identification separately. It also helps improve the accuracy of expressing complex friction characteristics in joint torque prediction. By constructing time-series training samples based on joint motion data and measured joint torque values, and using a hybrid time-series parameter identification model to extract local time-series dynamic features and global time-series dependency features, the model can simultaneously represent the motion change relationship between adjacent sampling times and the time-series correlation relationship across sampling times, improving the expressive power of the joint parameter prediction values ​​for the time-series features of surgical robot joint motion. By substituting the joint parameter predictions and joint motion data back into the joint dynamics model to obtain the joint torque predictions, and constructing a training loss function based on the torque prediction error and physical constraints, the consistency of joint torque predictions can be improved while constraining the physical feasibility of the joint parameter predictions. This avoids the problem of parameters lacking physical rationality due to focusing solely on torque error convergence. Therefore, this application can collaboratively optimize the dynamic parameter set and friction parameters within the same training framework, improving the consistency between the parameter identification results and the joint torque prediction relationship, and making the identified dynamic parameter set and friction parameters more suitable for feedforward compensation control of the joint drive torque of surgical robots.

[0152] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this application. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this application.

[0153] Some embodiments of this application also relate to a surgical robot, which may include a robotic arm, a joint drive unit, a data acquisition unit, and a controller. The robotic arm may include multiple joints and links connected in sequence, and the joint drive unit is connected to the multiple joints to drive each joint to produce corresponding rotation or movement. The joint drive unit may include at least one of a servo motor, a reduction mechanism, a braking mechanism, and a driver.

[0154] The data acquisition unit can be connected to the robotic arm and joint drive unit to collect joint motion data and measured joint torque values ​​during the robotic arm's movement along the excitation trajectory. The joint motion data can include at least one of joint position, joint velocity, and joint acceleration; the measured joint torque values ​​can be acquired by a joint torque sensor or calculated based on the current signal, torque constant, and transmission parameters of the joint drive motor. The data acquisition unit can also timestamp the collected joint motion data and measured joint torque values ​​to ensure a correspondence between the joint motion data and measured joint torque values ​​at the same sampling time.

[0155] The controller can communicate with the joint drive unit and the data acquisition unit. The controller can send excitation trajectory execution commands to the joint drive unit, causing the robotic arm to run according to a preset excitation trajectory; and receive joint motion data and measured joint torque values ​​collected by the data acquisition unit. The controller can also construct time-series training samples based on the joint motion data and measured joint torque values, and execute the joint identification method for surgical robot dynamic parameters and friction parameters described in any of the foregoing embodiments to obtain the set of dynamic parameters and friction parameters of the surgical robot.

[0156] In some embodiments, the controller may include a processor and a memory. The memory stores a computer program or a model parameter file. When the processor executes the computer program, it can implement the aforementioned method for jointly identifying the dynamic parameters and friction parameters of the surgical robot. Specifically, the controller can construct a joint dynamic model containing the set of dynamic parameters to be identified and the friction parameters to be identified. It can then call a hybrid temporal parameter identification model to extract features and predict joint parameters from temporal training samples, and train the hybrid temporal parameter identification model based on joint torque prediction errors and physical constraints. After training, the controller can determine the predicted values ​​of the dynamic parameter set and friction parameters output by the hybrid temporal parameter identification model as the dynamic parameter set and friction parameters of the surgical robot.

[0157] In some embodiments, the controller can store the obtained dynamic parameter set and friction parameters in a parameter storage area or a control parameter configuration file for subsequent motion control calls by the surgical robot. Further, when the surgical robot executes the target motion trajectory, the controller can calculate the feedforward compensation amount of the joint driving torque based on the dynamic parameter set, friction parameters, and the target joint motion state, and generate joint drive control commands based on the feedforward compensation amount. The joint drive unit can respond to the joint drive control commands by outputting the corresponding joint drive torque to drive the joint movement of the robotic arm. Thus, the surgical robot can use the jointly identified dynamic parameters and friction parameters to compensate for the joint drive torque, improving the accuracy of joint torque prediction and trajectory tracking stability.

[0158] It should be noted that the controller can be a robot controller installed within the surgical robot itself, or it can be a host computer, industrial control computer, or edge computing device that communicates with the surgical robot. The controller can execute the joint identification method of surgical robot dynamic parameters and friction parameters in the following ways: offline calibration, online update, or parameter distribution after offline training. The specific implementation method does not constitute a limitation on the scope of protection of this application.

[0159] Furthermore, some embodiments of this application also provide an electronic device. The electronic device can be various forms of digital computer, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, etc. The electronic device can also be various forms of mobile devices, such as cellular phones, smartphones, wearable devices, and other similar computing devices.

[0160] The electronic device includes: one or more processors; and a memory storing computer program instructions, which, when executed, cause the processor to perform a method for jointly identifying surgical robot dynamic parameters and friction parameters as provided in any one or more of the above embodiments. Figure 5An exemplary structural diagram of the electronic device is disclosed. The electronic device includes one or more processors 1101, a memory 1102, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components are interconnected via different buses 1105 and can be mounted on a common motherboard or otherwise as required. The processors can process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some other embodiments, multiple processors and / or multiple buses 1105 can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple electronic devices can be connected, each providing some of the necessary operations. The components, their connections and relationships, and their functions shown herein are merely examples and are not intended to limit the implementation of the present application described and / or claimed herein.

[0161] The electronic device may further include an input device 1103 and an output device 1104. The processor 1101, memory 1102, input device 1103, and output device 1104 may be connected via a bus 1105 or other means. Figure 5 Taking the connection between China and Israel via bus 1105 as an example.

[0162] Input device 1103 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the electronic device, such as a touch screen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 1104 may include a display device, auxiliary lighting device (e.g., LED), and haptic feedback device (e.g., vibration motor). The display device may include, but is not limited to, a liquid crystal display, a light-emitting diode display, and a plasma display. In some embodiments, the display device may be a touch screen.

[0163] To provide interaction with the user, the electronic device can be a computer. The computer has: a display device (e.g., a cathode ray tube or LCD monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback); and input from the user can be received in any form (e.g., voice input or tactile input).

[0164] In this embodiment, a computer-readable medium stores a computer program / instruction, which, when executed by a processor, implements a method for jointly identifying the dynamic parameters and friction parameters of a surgical robot provided in any one or more of the above embodiments. This computer-readable medium may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into that device. The aforementioned computer-readable medium carries one or more computer-readable instructions.

[0165] The memory 1102 can serve as a non-transitory computer-readable storage medium, used to store non-transitory software programs, non-transitory computer-executable programs, and modules. The processor 1101 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions, and modules stored in the memory 1102, thereby implementing the program instructions / modules corresponding to the methods provided in any one or more of the embodiments described above in this application.

[0166] The memory 1102 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device. Furthermore, the memory 1102 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 1102 may optionally include memory remotely located relative to the processor 1101, and these remote memories can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0167] It should be noted that the computer-readable medium described in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections having one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, optical fibers, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0168] Computer-readable media include permanent and non-permanent, removable and non-removable media, which can store information by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory, static random access memory, dynamic random access memory, other types of random access memory, read-only memory, electrically erasable programmable read-only memory, flash memory or other memory technologies, read-only optical discs, digital versatile optical discs or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0169] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including local area networks (LANs) or wide area networks (WANs), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0170] In the above embodiments, all or part of the implementation can be achieved through software, hardware, firmware, or any combination thereof. For example, it can be implemented using an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device. In some embodiments, the software program of this application can be executed by a processor to implement the above steps or functions. Similarly, the software program of this application (including related data structures) can be stored in a computer-readable recording medium, such as RAM memory, magnetic or optical drives, floppy disks, and similar devices. In addition, some steps or functions of this application can be implemented in hardware, for example, as circuitry that cooperates with a processor to perform the various steps or functions.

[0171] The computer program product provided in this application includes one or more computer programs / instructions. When executed by a processor, these computer programs / instructions generate, in whole or in part, the processes or functions described in this application. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.

[0172] The flowcharts or block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-specific system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0173] The scope of this application is defined by the appended claims rather than the foregoing description, and is therefore intended to encompass all variations falling within the meaning and scope of equivalents of the claims. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. Terms such as "first," "second," etc., are used only to distinguish descriptions and do not indicate any particular order, nor should they be construed as indicating or implying relative importance.

[0174] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily made by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims, and the above embodiments should be regarded as exemplary and non-limiting.

Claims

1. A method for jointly identifying the dynamic parameters and friction parameters of a surgical robot, characterized in that, include: A nonlinear friction model containing the friction parameters to be identified is embedded into the rigid body dynamics equations of the surgical robot to construct a joint dynamics model containing the set of dynamic parameters to be identified and the friction parameters to be identified. Acquire joint motion data and measured joint torque values ​​collected during the operation of the surgical robot according to the excitation trajectory, and construct time-series training samples based on the joint motion data and measured joint torque values; The hybrid temporal parameter identification model comprises an input layer, a long short-term memory network layer, a Transformer encoder layer, and a fully connected layer connected sequentially along the feature propagation direction. The temporal training samples are input into the hybrid temporal parameter identification model, which extracts local temporal dynamic features and global temporal dependency features based on the joint motion data, and outputs joint parameter prediction values, including: The input layer extracts joint motion data corresponding to consecutive sampling times from the time-series training samples, and forms a joint motion feature sequence based on the joint motion data; The joint motion feature sequence is recursively encoded by the long short-term memory network layer to obtain local temporal dynamic features that characterize the relationship between joint motion changes between adjacent sampling times. The local temporal dynamic features are positionally encoded and self-attention encoded by the Transformer encoder layer to obtain global temporal dependency features across sampling time steps; The global temporal dependency features are mapped by the fully connected layer to obtain and output the joint parameter prediction value, wherein the joint parameter prediction value includes the prediction value of the set of dynamic parameters to be identified and the prediction value of the friction parameter to be identified. The predicted values ​​of the joint parameters and the joint motion data are input into the joint dynamics model to obtain the predicted values ​​of the joint torques, including: Based on the joint position, joint velocity, and joint acceleration in the joint motion data, a dynamic regression matrix is ​​constructed to characterize the mapping relationship between rigid body dynamics terms and the joint motion data; Perform matrix operations on the dynamic regression matrix and the dynamic parameter set prediction values ​​of the joint parameter prediction values ​​to obtain the rigid body dynamic torque prediction components. Substituting the joint velocity and the predicted friction parameter value of the joint parameter prediction into the nonlinear friction model, the predicted nonlinear friction torque component is obtained. The predicted value of the joint torque is obtained based on the predicted components of the rigid body dynamic torque and the predicted components of the nonlinear friction torque. Based on the torque prediction error between the predicted joint torque value and the measured joint torque value, and the physical constraint term corresponding to the predicted joint parameter value, a training loss function is constructed to train the hybrid time-series parameter identification model until the training loss function satisfies the preset convergence condition. The joint parameter prediction values ​​output by the trained hybrid temporal parameter identification model are determined as the dynamic parameter set and friction parameters of the surgical robot, so as to perform feedforward compensation control on the joint driving torque of the surgical robot.

2. The method for jointly identifying the dynamic parameters and friction parameters of a surgical robot according to claim 1, characterized in that, The step of embedding a nonlinear friction model containing the friction parameters to be identified into the rigid body dynamics equations of the surgical robot to construct a joint dynamics model containing the set of dynamic parameters to be identified and the friction parameters to be identified includes: Based on the kinematic structural parameters of the surgical robot, a rigid body dynamics equation containing the dynamic parameters to be identified is established, and the rigid body dynamics equation is subjected to parameter linearization. Redundant parameters are removed from the rigid body dynamics equations after parameter linearization to obtain the minimum set of dynamic parameters to be identified. A nonlinear friction model is constructed with joint motion state as input and joint friction torque as output. The nonlinear friction model includes friction parameters to be identified to characterize the nonlinear friction characteristics during low-speed joint motion, variable-speed motion, and zero-crossing reversal. The joint friction torque term corresponding to the nonlinear friction model is incorporated into the rigid body dynamics equation after parameter linearization and redundant parameter removal, so that the set of dynamic parameters to be identified and the friction parameters to be identified act together on the same joint torque prediction relationship, thus obtaining the joint dynamics model.

3. The method for jointly identifying the dynamic parameters and friction parameters of a surgical robot according to claim 1, characterized in that, The Transformer encoder layer includes multiple parallel coding branches, which include at least a current window coding branch and a memory state coding branch. The step of performing positional encoding and self-attention encoding on the local temporal dynamic features through the Transformer encoder layer to obtain global temporal dependency features across sampling times includes: The current temporal window joint motion feature sequence output from the input layer is input into the embedding layer of the current window encoding branch to obtain the current window embedding feature sequence; The memory state features output by the memory units in the Long Short-Term Memory network layer at the previous time window are input into the embedding layer of the memory state encoding branch to obtain the memory state embedding feature sequence. The sampling temporal position encoding is fused into the current window embedded feature sequence and the memory state embedded feature sequence, respectively, to obtain the current window encoded input feature sequence and the memory state encoded input feature sequence; The current window encoding input feature sequence is encoded by the current window encoding branch to obtain the current window temporal features; The memory state encoding input feature sequence is encoded by the memory state encoding branch to obtain memory-enhanced temporal features; The current window temporal features and the memory-enhanced temporal features are fused to obtain the global temporal dependency features.

4. The method for jointly identifying the dynamic parameters and friction parameters of a surgical robot according to claim 3, characterized in that, The step of fusing the current window temporal features and the memory-enhanced temporal features to obtain the global temporal dependency features includes: Generate query features using the current window temporal features, and generate key and value features using the memory-enhanced temporal features; Based on the query features and the key features, calculate the cross-branch attention weight between the current window temporal features and the memory-enhanced temporal features; The value features are weighted and aggregated according to the cross-branch attention weights to obtain memory-enhanced fusion features; The memory-enhanced fusion feature is residually fused with the current window temporal feature to obtain the global temporal dependency feature.

5. The method for jointly identifying the dynamic parameters and friction parameters of a surgical robot according to claim 1, characterized in that, The step of constructing a training loss function based on the torque prediction error between the predicted joint torque value and the measured joint torque value, and the physical constraint term corresponding to the joint parameter prediction value, includes: Based on the torque prediction error between the predicted joint torque value and the measured joint torque value, a torque prediction error term is constructed. Based on the degree of deviation between the predicted values ​​of the dynamic parameter set in the joint parameter prediction values ​​and the preset physical feasibility conditions of the dynamic parameters, a physical feasibility constraint term for the dynamic parameters is constructed. The preset physical feasibility conditions of the dynamic parameters include at least one of the following: non-negative mass condition, positive definite inertia tensor condition, and bounded center of mass position condition. Based on the geometric metric relationship between the predicted values ​​of the dynamic parameter set and the preset physical feasible parameter domain, a geometric metric constraint term is constructed. The geometric metric constraint term is used to constrain the predicted values ​​of the dynamic parameter set to be located within the feasible region inside the preset physical feasible parameter domain. The training loss function is constructed based on the torque prediction error term, the physical feasibility constraint term of the dynamic parameters, and the geometric metric constraint term.

6. An electronic device, characterized in that, The electronic device includes: One or more processors; and a memory storing computer program instructions, which, when executed, cause the processors to perform the method for jointly identifying the dynamic parameters and friction parameters of a surgical robot as described in any one of claims 1-5.

7. A computer-readable storage medium having a computer program and / or instructions stored thereon, characterized in that, When the computer program and / or instructions are executed by the processor, they implement the method for joint identification of surgical robot dynamic parameters and friction parameters as described in any one of claims 1-5.

8. A computer program product, comprising a computer program and / or instructions, characterized in that, When the computer program and / or instructions are executed by the processor, they implement the method for joint identification of surgical robot dynamic parameters and friction parameters as described in any one of claims 1-5.

9. A surgical robot, characterized in that, include: The robotic arm comprises a joint drive unit, a data acquisition unit, and a controller; the robotic arm includes multiple joints, and the joint drive unit is connected to the multiple joints to drive the movement of the multiple joints. The data acquisition unit is used to collect joint motion data and measured joint torque values ​​of the robotic arm during its operation according to the excitation trajectory. The controller is connected to the joint drive unit and the data acquisition unit. The controller is used to execute the joint identification method of surgical robot dynamic parameters and friction parameters as described in any one of claims 1 to 5, so as to obtain the set of dynamic parameters and friction parameters of the surgical robot, and to perform feedforward compensation control on the joint drive torque of the surgical robot.

Citation Information

Patent Citations

  • Robot friction torque online prediction method and device, and computer readable storage medium

    CN120012298A

  • Physical and data hybrid driven mechanical arm dynamic model identification method

    CN120562257A