Motion error compensation method and system for surgical robot

By constructing the kinematic model and error compensation model of the surgical robot, real-time error compensation amount is obtained and inverse kinematics is performed, the problem of motion error of the surgical robot robot is solved and the accuracy of surgical operations is improved.

CN119550351AInactive Publication Date: 2025-03-04川北医学院附属医院

Patent Information

Application Number
CN202510112399.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-03-04
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The robotic arm of the surgical robot may have motion errors when executing control commands, resulting in insufficient surgical operation accuracy.

Method used

Through simulation experiments, the actual motion data of the robotic arm is collected, the kinematic model and error compensation model are constructed, the real-time error compensation amount is obtained, and the corresponding control command is generated through inverse kinematics solution to reduce motion errors.

Benefits of technology

It effectively reduces the robotic arm movement error of the surgical robot and improves the execution accuracy of the surgical action.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119550351A_ABST
    Figure CN119550351A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of robot motion control, and relates to a motion error compensation method and system for a surgical robot, and the method comprises the steps: collecting, processing and analyzing the actual motion data of each constraint point and tail end point of a mechanical arm, comparing the actual motion data of each constraint point and tail end point with standard motion data, and calculating the motion error of the surgical robot. Obtaining constraint points and end points which are not in the error range; kinematic models are constructed based on the constraint points and the tail end points of the two mechanical arms, and real-time error compensation amounts of the constraint points and the tail end points are obtained; performing inverse kinematics solution on the corresponding real-time error compensation amounts of the constraint point and the tail end point of the corresponding mechanical arm based on the kinematics model to obtain an inverse kinematics solution result; the inverse kinematics solving result is converted into the corresponding control command, the corresponding action is executed based on the corresponding control command, the difference between the actual action of the mechanical arm and the action corresponding to the control command is reduced, and the surgical action execution precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of surgical robot motion control, and in particular relates to a motion error compensation method and system for a surgical robot. Background Art

[0002] When a surgeon is performing surgery on a patient's lesion, the outcome of the surgery may be affected by the surgeon's physical, mental or emotional state at the time. For example, laparoscopic surgery is very difficult and requires very high surgical precision, as it needs to be performed in a relatively small space in the patient's abdominal cavity. This also places very high demands on the surgeon. Therefore, the surgeon's physical, mental or emotional state during the surgery will have a significant impact on the surgical process and outcome, especially stability during the surgical operation is crucial.

[0003] Later, with the development of intelligent robots, robots gradually emerged in the surgical process. Surgical robots are robots that assist doctors in minimally invasive surgery. Surgeons remotely send control commands to the surgical robots through cameras in the operating room outside the operating room. The surgical robots receive the control commands and perform the corresponding surgical operations through the surgical robot arms. Due to the high stability of the operation and the intelligent analysis of data such as real-time images of lesions, surgical robots effectively reduce the difficulty and operating space of the operation, and achieve better surgical results.

[0004] However, when the surgical robot receives the control commands issued by the surgeon in the operating room outside the operating room, it executes the corresponding actions through the command execution component, that is, the robotic arm of the surgical robot. However, due to various reasons of the robotic arm, there may be a certain error between the actual action of the robotic arm and the action corresponding to the control command, resulting in a difference between the actual action of the robotic arm and the action corresponding to the control command, which in turn leads to insufficient accuracy of the surgical operation.

[0005] Therefore, how to control the surgical robot in the process of executing control commands, reduce the impact of the motion error of the surgical robot's robotic arm, and improve the accuracy of surgical action execution is a technical problem that urgently needs to be solved for surgical robots. Summary of the invention

[0006] The object of the present invention is to provide a motion error compensation method and system for a surgical robot, so as to control the surgical robot in the process of executing control commands, reduce the influence of motion errors of the robotic arm of the surgical robot, and improve the accuracy of surgical action execution.

[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows: In a first aspect, a motion error compensation method for a surgical robot is provided, comprising the following steps: S1: Conduct a simulation test on the surgical robot, send control commands corresponding to each execution action to the surgical robot, collect actual motion data of each constraint point and end point of the dual robotic arms of the surgical robot, and transmit the data to the data analysis module; S2: The data analysis module processes and analyzes the actual motion data of each constraint point and end point of the dual robotic arms, compares the actual motion data of each constraint point and end point with the standard motion data, determines whether the error between the corresponding constraint point and end point is within the error range, and obtains the constraint points and end points of each robotic arm that are not within the error range; S3: constructing kinematic models of the two robotic arms based on the constraint points and end points of the two robotic arms, and creating error compensation models based on the two kinematic models of the two robotic arms; S4: obtaining the real-time error compensation amount of each constraint point and end point through the error compensation model; S5: Based on the two robot arm kinematic models, an inverse kinematics solution is performed on the corresponding real-time error compensation amounts of the constraint points and end points of the corresponding robot arms to obtain an inverse kinematics solution result; S6: Convert the inverse kinematics solution result into a corresponding control command, and the dual robotic arms of the surgical robot perform corresponding actions based on the corresponding control command.

[0008] Preferably, the specific process of comparing the actual motion data of each constraint point and the end point with the standard motion data in step S2 is as follows: S21: reordering the actual motion data of each constraint point and the end point according to a specified order to construct a first data group of the actual motion data; S22: reordering the standard motion data of each constraint point and the end point according to the same specified order to construct a second data group of the standard motion data; S23: Calculate the differences between the data elements at corresponding positions of the first data group and the second data group respectively, determine whether each calculated difference is within the corresponding preset error range, extract the differences that are not within the preset error range, and obtain the constraint points and end points of each of the robotic arms that are not within the error range based on the differences that are not within the preset error range.

[0009] Preferably, the specific process of constructing the kinematic model of the robotic arm based on the constraint points and the end points of the two robotic arms in step S3 is as follows: S31: Set the initial positions of the two robotic arms, straighten the two robotic arms as a whole and point them upward, with the axis of the transverse joint set to x axis; S32: Set the axes of other joints to the z Axis, the direction is opposite to the motor rotation direction; S33: If the adjacent i Joints and i -1 If the axes of the joints intersect, set the intersection point as the origin. x The axis is perpendicular to the plane where the axes of the two joints are located, and the direction is arbitrary; if the adjacent i Joints and i -1 If the axes of the joints do not intersect, set the common perpendicular line of the two axes to i The intersection of the joint axes is the origin. x The axis is on the common perpendicular line and has any direction; If the adjacent i Joints and i +1 If the axes of the joints intersect, set the intersection point as the origin. x The axis is perpendicular to the plane where the axes of the two joints are located, and the direction is arbitrary; if the adjacent i Joints and i+ 1. If the axes of the joints do not intersect, set the common perpendicular line of the two axes to i The intersection of the joint axes is the origin. x The axis is on the common perpendicular line and has any direction; Establish the coordinate system of each joint; S34: i -1 Joint coordinate system x axis x i-1 Raodi i Articular z axis z i Rotate to the i Joint coordinate system x axis x i Parallel, the angle of rotation is recorded as i i ; S35: i -1 Joint coordinate system x axis x i-1 Along the i -1 joint z axis z i-1 Shift to i Joint coordinate system x axis x i , the translation distance is recorded as d i ; S36: i -1 Joint coordinate system z axis z i-1 Raodi i -1 Joint coordinate system x axis x i-1 Go to i Joint coordinate system z axis z i Parallel, the angle of rotation is recorded as α i ; S37: i -1 Joint coordinate system z axis z i-1 Along the i -1 joint x axis x i-1 Shift to i Joint coordinate system z axis z i , the translation distance is recorded as a i , until the two coordinate systems coincide.

[0010] Preferably, the specific process of obtaining the error compensation amount of each constraint point and end point through the error compensation model in step S4 is as follows: S41: annotating the collected actual motion data of each constraint point and end point of the dual robotic arms of the surgical robot based on standard motion data; S42: inputting the annotated actual motion data into the error compensation model for model training and verification, until the verification result of the error compensation model meets the preset performance requirements; S43: Acquire the pose data of each constraint point and end point of the dual robotic arms of the surgical robot in real time, and input the pose data into the error compensation model after preprocessing. The error compensation model calculates and outputs the real-time error compensation amount of each constraint point and end point of the dual robotic arms.

[0011] Preferably, the error compensation model includes an input unit, a reset unit and an update unit, wherein the input unit is used to input the real-time posture data of each constraint point and the end point of the dual manipulator of the surgical robot, and the reset unit is used to calculate the data reset degree of the hidden state at the current moment, if the calculation result of the reset unit is close to 0, the state information at the current moment is removed, and if the calculation result of the reset unit is close to 1, the state information at the current moment is retained; The calculation formula of the reset unit is as follows: P t = s ( W r ·[ h t-1 , x t ]+ b r ); in, P t is the output result of the reset unit at the current moment, s is the preset activation function, W r is the weight matrix, h t-1 is the hidden state at the previous moment, x t is the input data at the current moment, b r To specify the offset term.

[0012] Preferably, the updating unit calculates the weight ratio of the hidden state at the previous moment and the new candidate state at the current moment, and outputs it after taking a weighted average between the previous moment and the current moment; The calculation formula of the update unit is as follows: U t = s ( W z ·[ h t-1 , x t ]+ b z ); in, U t is the output result of the update unit at the current moment, s is the preset activation function, W z is the weight matrix, h t-1 is the hidden state at the previous moment, x t is the input data at the current moment, b z is the specified bias term; The formula for outputting the weighted average between the previous moment and the current moment by the update unit is as follows: f t =(1- U t )*h t-1 + U t *h t ; in, f t It is the output value of the update unit after weighted average between the previous moment and the current moment.

[0013] Preferably, the specific process of performing inverse kinematics solution to obtain the inverse kinematics solution result in step S5 is as follows: S51: converting the corresponding real-time error compensation amounts of the constraint points and end points of the robot arm into real-time error compensation vectors, and using them as the initial population; S52: Randomly select two different individuals in the initial population, scale their vector differences, and perform vector synthesis with the individual to be mutated; S53: setting a crossover probability, and randomly selecting individuals through a crossover operation based on the crossover probability, and selecting individuals that meet preset indicators as new individuals; S54: setting a mutation probability, and performing a mutation operation based on the mutation probability; S55: Iteratively execute steps S52-S54 to iteratively update the population until a preset requirement is met or a preset maximum number of iterations is reached.

[0014] Preferably, the formula for the initial population in step S51 is: { X i (0)∣ x ij L ≤ x ij (0) ≤ x ij u ; i =1,2,···NP, j =1,2,···D}; in, X i (0) is i Individuals, j For the j dimension, x ij L Indicates j The lower bound of dimension, x ij u Indicates j The upper bound of dimension, x ij (0)= xij L + rand (0, 1), rand (0, 1) represents a random number in the interval [0, 1].

[0015] In a second aspect, a motion error compensation system of a surgical robot is provided, which is used to implement the motion error compensation method of a surgical robot, and includes a data acquisition module, a data analysis module, a mechanical arm kinematics model, an error compensation model, an inverse kinematics solution module and a control command generation module, wherein the data acquisition module is connected to the data analysis module, the mechanical arm kinematics model is connected to the error compensation model, the error compensation model is connected to the inverse kinematics solution module, and the inverse kinematics solution module is connected to the control command generation module; The data acquisition module is used to collect motion data of each constraint point and end point of the dual mechanical arms of the surgical robot, and transmit it to the data analysis module; The data analysis module is used to process and analyze the actual motion data of each constraint point and end point of the dual robotic arms, compare the actual motion data of each constraint point and end point with the standard motion data, determine whether the error between the corresponding constraint point and end point is within the error range, and obtain the constraint points and end points of each of the robotic arms that are not within the error range; The kinematic model of the robot arm is constructed based on the constraint points and end points of the two robot arms; The error compensation model is used to obtain the real-time error compensation amount of each constraint point and end point; The inverse kinematics solution module is used to perform inverse kinematics solution on the corresponding real-time error compensation amounts of the constraint points and end points of the corresponding robotic arms based on the two robotic arm kinematic models to obtain an inverse kinematics solution result; The control command generation module converts the inverse kinematics solution results into corresponding control commands and transmits them to the dual robotic arms of the surgical robot. The dual robotic arms of the surgical robot perform corresponding actions based on the corresponding control commands.

[0016] The beneficial effects of the present invention include: The motion error compensation method and system of the surgical robot provided by the present invention collect the actual motion data of each constraint point and end point of the robotic arm; process and analyze the actual motion data of each constraint point and end point of the dual robotic arms, compare the actual motion data of each constraint point and end point with the standard motion data, and obtain the constraint points and end points that are not within the error range; construct kinematic models based on the constraint points and end points of the two robotic arms respectively, and obtain the real-time error compensation amount of each constraint point and end point; perform inverse kinematics solution on the corresponding real-time error compensation amount of the constraint points and end points of the corresponding robotic arms based on the kinematic model to obtain the inverse kinematic solution result; convert the inverse kinematic solution result into a corresponding control command, and the dual robotic arms of the surgical robot execute the corresponding action based on the corresponding control command, thereby reducing the influence of the motion error of the surgical robot and improving the accuracy of surgical action execution.

[0017] First, the actual motion data of each constraint point and end point are reordered in a specified order to construct a first data group of actual motion data; the standard motion data of each constraint point and end point are reordered in the same specified order to construct a second data group of standard motion data; the difference between the data elements at the corresponding positions of the first data group and the second data group is calculated respectively, and the difference that is not within the preset error range is extracted, and the constraint points and end points of each robot arm that are not within the error range are obtained based on the difference that is not within the preset error range, so that the points that need to be compensated for errors in each constraint point and end point can be accurately obtained, providing precise objects for subsequent error compensation, facilitating subsequent error compensation, and improving the execution accuracy of surgical actions.

[0018] Second, by extending the two robotic arms straight upward as the initial position, the axes of the other joints are set to the axes of the joints. z axis, the direction is opposite to the motor rotation direction; if the adjacent i Joints and i -1 If the axes of the joints intersect, set the intersection point as the origin. x The axis is perpendicular to the plane where the axes of the two joints are located, and the direction is arbitrary; if the adjacent i Joints and i -1 If the axes of the joints do not intersect, set the common perpendicular line of the two axes to i The intersection of the joint axes is the origin. x The axis is on the common perpendicular line, and the direction is arbitrary; if the adjacent i Joints and i +1 If the axes of the joints intersect, set the intersection point as the origin. x The axis is perpendicular to the plane where the axes of the two joints are located, and the direction is arbitrary; if the adjacent i Joints and i+1. If the axes of the joints do not intersect, set the common perpendicular line of the two axes to i The intersection of the joint axes is the origin. x The axis is on the common perpendicular line with arbitrary direction. The coordinate system of each joint is established, and the parameters of the coordinate system are defined based on the actual situation of the robot arm. The modeling process is simple, but it can accurately simulate and quantify the movement of the robot arm, providing an accurate motion model for subsequent inverse kinematics solution.

[0019] Third, the collected actual motion data of each constraint point and end point of the dual robotic arms of the surgical robot are annotated based on the standard motion data, and the annotated actual motion data are input into the error compensation model for model training and verification, and the position data of each constraint point and end point of the dual robotic arms of the surgical robot are obtained, and input into the error compensation model after preprocessing. The error compensation model can automatically, quickly and accurately calculate and output the real-time error compensation amount of each constraint point and end point of the dual robotic arms, which is convenient for the subsequent inverse kinematics solution to obtain the optimal solution, and then generate the corresponding control commands to dynamically obtain the best execution action at each moment, so as to realize the precise execution of surgical actions.

[0020] Fourth, the error compensation model includes an input unit, a reset unit and an update unit. The input unit is used to input the real-time posture data of each constraint point and the end point of the dual robotic arms of the surgical robot. The reset unit is used to calculate the data reset degree of the hidden state at the current moment. If the calculation result of the reset unit is close to 0, the state information at the current moment is removed. If the calculation result of the reset unit is close to 1, the state information at the current moment is retained, thereby intelligently realizing accurate prediction of the error compensation amount and providing a data basis for subsequent precise action execution.

[0021] Fifth, by converting the real-time error compensation amounts corresponding to the constraint points and end points of the robot arm into real-time error compensation vectors, and using them as the initial population, randomly selecting two different individuals from the initial population, scaling their vector differences and performing vector synthesis with the individual to be mutated, setting the crossover probability, and randomly selecting individuals through crossover operations based on the crossover probability, selecting individuals that meet preset indicators as new individuals, setting the mutation probability, and performing the optimization process of mutation operations based on the mutation probability can dynamically obtain the optimal solution, and subsequently can obtain the optimal motion control commands in real time, thereby performing precise actions, effectively improving the accuracy of the motion execution of the surgical robot. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a schematic flow chart of the motion error compensation method of the surgical robot of the present invention.

[0023] Figure 2The present invention is a flow chart of performing inverse kinematics solution to obtain inverse kinematics solution results.

[0024] Figure 3 Schematic diagram of the structure of the motion error compensation system of the surgical robot of the present invention. DETAILED DESCRIPTION

[0025] The following is combined with Figure 1~Figure 3 The present invention is further described in detail: Example 1 See attached Figure 1 As shown, a motion error compensation method for a surgical robot comprises the following steps: S1: Conduct simulation tests on the surgical robot, send control commands corresponding to each execution action to the surgical robot, collect actual motion data of each constraint point and end point of the dual robotic arms of the surgical robot, and transmit them to the data analysis module. Since there are differences between surgical robots even if they are produced using the same production equipment and the same production process, there will also be differences in the process of performing surgical actions. Therefore, a simulation test is conducted on each surgical robot before the operation, so as to facilitate the subsequent error analysis and then error compensation.

[0026] S2: The data analysis module processes and analyzes the actual motion data of each constraint point and end point of the dual manipulator, compares the actual motion data of each constraint point and end point with the standard motion data, determines whether the error between the corresponding constraint point and end point is within the error range, and obtains the constraint points and end points in each of the manipulators that are not within the error range. The actual motion data of each constraint point and end point is obtained through simulation tests, and compared with the standard motion data, so that the constraint points and end points whose errors are not within the preset error range can be known, which is convenient for subsequent error compensation.

[0027] S3: Based on the constraint points and end points of the two robotic arms, the kinematic models of the robotic arms are respectively constructed, and based on the two kinematic models of the robotic arms, error compensation models are respectively created, so as to simplify the complex motion pattern of the surgical robot, but accurately describe the motion of the robotic arms, reduce the data processing dimension and difficulty, and improve the data processing efficiency.

[0028] S4: The real-time error compensation amount of each constraint point and end point is obtained through the error compensation model; the error compensation model includes an input unit, a reset unit and an update unit, the input unit is used to input the real-time posture data of each constraint point and the end point of the dual robotic arms of the surgical robot, and the reset unit is used to calculate the data reset degree of the hidden state at the current moment. If the calculation result of the reset unit is close to 0, the state information at the current moment is removed. If the calculation result of the reset unit is close to 1, the state information at the current moment is retained, thereby intelligently realizing accurate prediction of the error compensation amount and providing a data basis for subsequent precise action execution.

[0029] S5: Based on the two robot arm kinematic models, an inverse kinematics solution is performed on the corresponding real-time error compensation amounts of the constraint points and end points of the corresponding robot arms to obtain an inverse kinematics solution result; S6: Convert the inverse kinematics solution result into a corresponding control command, and the dual robotic arms of the surgical robot perform corresponding actions based on the corresponding control command. By converting the corresponding real-time error compensation amount of the constraint point and the end point of the robotic arm into a real-time error compensation vector, and using it as the initial population, randomly selecting two different individuals in the initial population, scaling their vector difference and performing vector synthesis with the individual to be mutated, setting the crossover probability, and randomly selecting individuals through a crossover operation based on the crossover probability, selecting individuals that meet the preset indicators as new individuals, setting the mutation probability, and performing the optimization process of mutation operation based on the mutation probability can dynamically obtain the best solution, and subsequently can obtain the best action control command in real time, and then perform precise actions, effectively improving the accuracy of the action execution of the surgical robot.

[0030] Example 2 Based on Example 1, the specific process of comparing the actual motion data of each constraint point and end point with the standard motion data in step S2 is as follows: S21: reordering the actual motion data of each constraint point and the end point according to a specified order to construct a first data group of the actual motion data; S22: reordering the standard motion data of each constraint point and the end point according to the same specified order to construct a second data group of the standard motion data; S23: Calculate the differences between the data elements at corresponding positions of the first data group and the second data group respectively, determine whether each calculated difference is within the corresponding preset error range, extract the differences that are not within the preset error range, and obtain the constraint points and end points of each of the robotic arms that are not within the error range based on the differences that are not within the preset error range.

[0031] In this embodiment, the actual motion data of each constraint point and the end point are reordered in a specified order to construct a first data group of actual motion data; the standard motion data of each constraint point and the end point are reordered in the same specified order to construct a second data group of standard motion data; the differences between the data elements at corresponding positions of the first data group and the second data group are calculated respectively, the differences that are not within the preset error range are extracted, and the constraint points and end points in each robot arm that are not within the error range are obtained based on the differences that are not within the preset error range. The points that need to be compensated for errors in each constraint point and end point can be accurately obtained, providing precise objects for subsequent error compensation, facilitating subsequent error compensation, and improving the execution accuracy of surgical actions.

[0032] Example 3 On the basis of Example 1 or Example 2, the specific process of constructing the kinematic model of the robot arm based on the constraint points and the end points of the two robot arms in step S3 is as follows: S31: Set the initial positions of the two robotic arms, straighten the two robotic arms as a whole and point them upward, with the axis of the transverse joint set to x axis; S32: Set the axes of other joints to the z Axis, the direction is opposite to the motor rotation direction; S33: If the adjacent i Joints and i -1 If the axes of the joints intersect, set the intersection point as the origin. x The axis is perpendicular to the plane where the axes of the two joints are located, and the direction is arbitrary; if the adjacent i Joints and i -1 If the axes of the joints do not intersect, set the common perpendicular line of the two axes to i The intersection of the joint axes is the origin. x The axis is on the common perpendicular line and has any direction; If the adjacent i Joints and i +1 If the axes of the joints intersect, set the intersection point as the origin. x The axis is perpendicular to the plane where the axes of the two joints are located, and the direction is arbitrary; if the adjacent i Joints and i+ 1. If the axes of the joints do not intersect, set the common perpendicular line of the two axes to i The intersection of the joint axes is the origin. x The axis is on the common perpendicular line and has any direction; Establish the coordinate system of each joint; S34: i -1 Joint coordinate system x axisx i-1 Raodi i Articular z axis z i Rotate to the i Joint coordinate system x axis x i Parallel, the angle of rotation is recorded as i i ; S35: i -1 Joint coordinate system x axis x i-1 Along the i -1 joint z axis z i-1 Shift to i Joint coordinate system x axis x i , the translation distance is recorded as d i ; S36: i -1 Joint coordinate system z axis z i-1 Raodi i -1 Joint coordinate system x axis x i-1 Go to i Joint coordinate system z axis z i Parallel, the angle of rotation is recorded as α i ; S37: i -1 Joint coordinate system z axis z i-1 Along the i -1 joint x axis x i-1 Shift to i Joint coordinate system z axis z i , the translation distance is recorded as a i , until the two coordinate systems coincide.

[0033] The above modeling process simplifies the complex motion pattern of the surgical robot, but can accurately simulate and quantify the motion of the robotic arm, reduce the data processing dimension and difficulty, improve data processing efficiency, and provide an accurate motion model for subsequent inverse kinematics solutions.

[0034] Example 4 On the basis of Example 1 or Example 2 or Example 3, the specific process of obtaining the error compensation amount of each constraint point and end point through the error compensation model in step S4 is as follows: S41: annotating the collected actual motion data of each constraint point and end point of the dual robotic arms of the surgical robot based on standard motion data; S42: inputting the annotated actual motion data into the error compensation model for model training and verification, until the verification result of the error compensation model meets the preset performance requirements; S43: Acquire the pose data of each constraint point and end point of the dual robotic arms of the surgical robot in real time, and input the pose data into the error compensation model after preprocessing. The error compensation model calculates and outputs the real-time error compensation amount of each constraint point and end point of the dual robotic arms.

[0035] In this embodiment, the error compensation model includes an input unit, a reset unit and an update unit. The input unit is used to input the real-time posture data of each constraint point and the end point of the dual robotic arm of the surgical robot. The reset unit is used to calculate the data reset degree of the hidden state at the current moment. If the calculation result of the reset unit is close to 0, the state information at the current moment is removed. If the calculation result of the reset unit is close to 1, the state information at the current moment is retained. The calculation formula of the reset unit is as follows: P t = s ( W r ·[ h t-1 , x t ]+ b r ); in, P t is the output result of the reset unit at the current moment, s is the preset activation function, W r is the weight matrix, h t-1 is the hidden state at the previous moment, x t is the input data at the current moment, br To specify the offset term.

[0036] The updating unit calculates the weight ratio of the hidden state at the previous moment and the new candidate state at the current moment, and outputs it after taking a weighted average between the previous moment and the current moment; The calculation formula of the update unit is as follows: U t = s ( W z ·[ h t-1 , x t ]+ b z ); in, U t is the output result of the update unit at the current moment, s is the preset activation function, W z is the weight matrix, h t-1 is the hidden state at the previous moment, x t is the input data at the current moment, b z is the specified bias term; The formula for outputting the weighted average between the previous moment and the current moment by the update unit is as follows: f t =(1- U t )* h t-1 + U t *h t ; in, f t It is the output value of the update unit after weighted average between the previous moment and the current moment.

[0037] The error compensation model includes an input unit, a reset unit and an update unit. The input unit is used to input the real-time posture data of each constraint point and the end point of the dual robotic arms of the surgical robot. The reset unit is used to calculate the data reset degree of the hidden state at the current moment. If the calculation result of the reset unit is close to 0, the state information at the current moment is removed. If the calculation result of the reset unit is close to 1, the state information at the current moment is retained. Accurate prediction of the error compensation amount is intelligently achieved, providing a data basis for subsequent precise action execution.

[0038] Example 5 On the basis of Example 1 or Example 2 or Example 3 or Example 4, the specific process of performing inverse kinematics solution to obtain the inverse kinematics solution result in step S5 is as follows: S51: converting the corresponding real-time error compensation amounts of the constraint points and end points of the robot arm into real-time error compensation vectors, and using them as the initial population; S52: Randomly select two different individuals in the initial population, scale their vector differences, and perform vector synthesis with the individual to be mutated; S53: setting a crossover probability, and randomly selecting individuals through a crossover operation based on the crossover probability, and selecting individuals that meet preset indicators as new individuals; S54: setting a mutation probability, and performing a mutation operation based on the mutation probability; S55: Iteratively execute steps S52-S54 to iteratively update the population until a preset requirement is met or a preset maximum number of iterations is reached.

[0039] In this embodiment, the formula for the initial population in step S51 is: { X i (0)∣ x ij L ≤ x ij (0) ≤ x ij u ; i =1,2,···NP, j =1,2,···D}; in, X i (0) is i Individuals, j For the j dimension, x ij L Indicates j The lower bound of dimension, x ij u Indicates j The upper bound of dimension, x ij (0)= x ij L + rand (0, 1), rand (0, 1) represents a random number in the interval [0, 1].

[0040] The real-time error compensation amounts corresponding to the constraint points and end points of the robot arm are converted into real-time error compensation vectors, and used as the initial population. Two different individuals in the initial population are randomly selected, their vector differences are scaled and vector synthesized with the individual to be mutated. The crossover probability is set, and individuals are randomly selected through crossover operations based on the crossover probability. Individuals that meet preset indicators are selected as new individuals. The mutation probability is set, and the optimization process of performing mutation operations based on the mutation probability can dynamically obtain the optimal solution, and subsequently the optimal motion control command can be obtained in real time, thereby executing precise actions, effectively improving the accuracy of the action execution of the surgical robot.

[0041] A motion error compensation system for a surgical robot is used to implement a motion error compensation method for a surgical robot, comprising a data acquisition module, a data analysis module, a robotic arm kinematic model, an error compensation model, an inverse kinematics solution module and a control command generation module, wherein the data acquisition module is connected to the data analysis module, the robotic arm kinematic model is connected to the error compensation model, the error compensation model is connected to the inverse kinematics solution module, and the inverse kinematics solution module is connected to the control command generation module.

[0042] The data acquisition module is used to collect the motion data of each constraint point and end point of the dual manipulator of the surgical robot, and transmit it to the data analysis module; the data analysis module is used to process and analyze the actual motion data of each constraint point and end point of the dual manipulator, compare the actual motion data of each constraint point and end point with the standard motion data, determine whether the error between the corresponding constraint point and end point is within the error range, and obtain the constraint points and end points of each manipulator that are not within the error range; the manipulator kinematic model is constructed based on the constraint points and end points of the two manipulators. The error compensation model is used to obtain the real-time error compensation amount of each constraint point and end point; the inverse kinematics solution module is used to perform inverse kinematics solution on the corresponding real-time error compensation amount of the constraint points and end points of the corresponding manipulator based on the kinematic models of the two manipulators to obtain the inverse kinematics solution result; the control command generation module converts the inverse kinematics solution result into a corresponding control command and transmits it to the dual manipulator of the surgical robot, and the dual manipulator of the surgical robot performs the corresponding action based on the corresponding control command.

[0043] In summary, the motion error compensation method and system of the surgical robot provided by the present invention constructs a first data group of actual motion data and a second data group of standard motion data; respectively calculates the difference between the data elements at the corresponding positions of the first data group and the second data group, extracts the difference that is not within the preset error range, obtains the constraint points and end points of each robot arm that are not within the error range, and can accurately obtain the points that need to be compensated for errors in each constraint point and end point, providing precise objects for subsequent error compensation, facilitating subsequent error compensation, and improving the execution accuracy of surgical actions. The two robot arms are straightened upward as a whole as the initial position, and the axes of the other joints are set to the axes of each joint. z axis, the direction is opposite to the motor rotation direction; set the adjacent i Joints and i -1 The intersection of the axes of the joint is the origin or the common perpendicular line of the two axes is set to i The intersection of the joint axes is taken as the origin, the coordinate system of each joint is established, and the various parameters of the coordinate system are defined based on the actual situation of the robot arm. The modeling process is simple, but it can accurately simulate and quantify the movement of the robot arm, providing an accurate motion model for subsequent inverse kinematics solutions.

[0044] The actual motion data of each constraint point and end point are annotated based on the standard motion data, and the annotated actual motion data is input into the error compensation model to obtain the pose data of each constraint point and end point of the dual robotic arms of the surgical robot, and the real-time error compensation amount of each constraint point and end point of the dual robotic arms is automatically, quickly and accurately calculated and output, so as to facilitate the subsequent optimal solution through inverse kinematics solution, and then generate the corresponding control command to dynamically obtain the best execution action at each moment, so as to realize the execution of accurate surgical actions. The error compensation model includes an input unit, a reset unit and an update unit. The input unit is used to input the real-time pose data of each constraint point and end point of the dual robotic arms of the surgical robot. The reset unit is used to calculate the data reset degree of the hidden state at the current moment. If the calculation result of the reset unit is close to 0, the state information at the current moment is removed. If the calculation result of the reset unit is close to 1, the state information at the current moment is retained, and the accurate prediction of the error compensation amount is intelligently realized, providing a data basis for the subsequent accurate action execution. The real-time error compensation amounts corresponding to the constraint points and end points of the robot arm are converted into real-time error compensation vectors, and used as the initial population. Two different individuals in the initial population are randomly selected, their vector differences are scaled and vector synthesized with the individual to be mutated. The crossover probability is set, and individuals are randomly selected through crossover operations based on the crossover probability. Individuals that meet preset indicators are selected as new individuals. The mutation probability is set, and the optimization process of performing mutation operations based on the mutation probability can dynamically obtain the optimal solution, and subsequently the optimal motion control command can be obtained in real time, thereby executing precise actions, effectively improving the accuracy of the action execution of the surgical robot.

Claims

1. A motion error compensation method for a surgical robot, characterized in that: The following steps are involved: S1: Conduct a simulation test on the surgical robot, send control commands corresponding to each execution action to the surgical robot, collect actual motion data of each constraint point and end point of the dual robotic arms of the surgical robot, and transmit the data to the data analysis module; S2: The data analysis module processes and analyzes the actual motion data of each constraint point and end point of the dual robotic arms, compares the actual motion data of each constraint point and end point with the standard motion data, determines whether the error between the corresponding constraint point and end point is within the error range, and obtains the constraint points and end points of each robotic arm that are not within the error range; S3: constructing kinematic models of the two robotic arms based on the constraint points and end points of the two robotic arms, and creating error compensation models based on the two kinematic models of the two robotic arms; S4: obtaining the real-time error compensation amount of each constraint point and end point through the error compensation model; S5: Based on the two robot arm kinematic models, an inverse kinematics solution is performed on the corresponding real-time error compensation amounts of the constraint points and end points of the corresponding robot arms to obtain an inverse kinematics solution result; S6: Convert the inverse kinematics solution result into a corresponding control command, and the dual robotic arms of the surgical robot perform corresponding actions based on the corresponding control command.

2. The motion error compensation method of a surgical robot according to claim 1, characterized in that: The specific process of comparing the actual motion data of each constraint point and end point with the standard motion data in step S2 is as follows: S21: reordering the actual motion data of each constraint point and the end point according to a specified order to construct a first data group of the actual motion data; S22: reordering the standard motion data of each constraint point and the end point according to the same specified order to construct a second data group of the standard motion data; S23: Calculate the differences between the data elements at corresponding positions of the first data group and the second data group respectively, determine whether each calculated difference is within the corresponding preset error range, extract the differences that are not within the preset error range, and obtain the constraint points and end points of each of the robotic arms that are not within the error range based on the differences that are not within the preset error range.

3. The motion error compensation method of a surgical robot according to claim 1, characterized in that: The specific process of constructing the kinematic model of the robot arm based on the constraint points and end points of the two robot arms in step S3 is as follows: S31: Set the initial positions of the two robotic arms, straighten the two robotic arms as a whole and point them upward, with the axis of the transverse joint set to x axis; S32: Set the axes of other joints to the z Axis, the direction is opposite to the motor rotation direction; S33: If the adjacent i Joints and i -1 If the axes of the joints intersect, set the intersection point as the origin. x The axis is perpendicular to the plane where the axes of the two joints are located, and the direction is arbitrary; if the adjacent i Joints and i -1 If the axes of the joints do not intersect, set the common perpendicular line of the two axes to i The intersection of the joint axes is the origin. x The axis is on the common vertical line and has any direction; If the adjacent i Joints and i +1 If the axes of the joints intersect, set the intersection point as the origin. x The axis is perpendicular to the plane where the axes of the two joints are located, and the direction is arbitrary; if the adjacent i Joints and i+ 1. If the axes of the joints do not intersect, set the common perpendicular line of the two axes to i The intersection of the joint axes is the origin. x The axis is on the common perpendicular line and has any direction; Establish the coordinate system of each joint; S34: i -1 Joint coordinate system x axis x i-1 Raodi i Articular z axis z i Rotate to the i Joint coordinate system x axis x i Parallel, the angle of rotation is recorded as θ i ; S35: i -1 Joint coordinate system x axis x i-1 Along the i -1 joint z axis z i-1 Shift to i Joint coordinate system x axis x i , the translation distance is recorded as d i ; S36: i -1 Joint coordinate system z axis z i-1 Raodi i -1 Joint coordinate system x axis x i-1 Go to i Joint coordinate system z axis z i Parallel, the angle of rotation is recorded as α i ; S37: i -1 Joint coordinate system z axis z i-1 Along the i -1 joint x axis x i-1 Shift to i Joint coordinate system z axis z i , the translation distance is recorded as a i , until the two coordinate systems coincide.

4. The motion error compensation method of a surgical robot according to claim 1, characterized in that: The specific process of obtaining the error compensation amount of each constraint point and end point through the error compensation model in step S4 is as follows: S41: annotating the collected actual motion data of each constraint point and end point of the dual robotic arms of the surgical robot based on standard motion data; S42: inputting the annotated actual motion data into the error compensation model for model training and verification, until the verification result of the error compensation model meets the preset performance requirements; S43: Acquire the pose data of each constraint point and end point of the dual robotic arms of the surgical robot in real time, and input the pose data into the error compensation model after preprocessing. The error compensation model calculates and outputs the real-time error compensation amount of each constraint point and end point of the dual robotic arms.

5. The motion error compensation method of a surgical robot according to claim 4, characterized in that: The error compensation model includes an input unit, a reset unit and an update unit, wherein the input unit is used to input the real-time posture data of each constraint point and the end point of the dual mechanical arm of the surgical robot, and the reset unit is used to calculate the data reset degree of the hidden state at the current moment, if the calculation result of the reset unit is close to 0, the state information at the current moment is removed, and if the calculation result of the reset unit is close to 1, the state information at the current moment is retained; The calculation formula of the reset unit is as follows: P t = σ ( W r ·[ h t-1 , x t ]+ b r ); in, P t is the output result of the reset unit at the current moment, σ is the preset activation function, W r is the weight matrix, h t-1 is the hidden state at the previous moment, x t is the input data at the current moment, b r To specify the offset term.

6. The motion error compensation method of a surgical robot according to claim 5, characterized in that: The updating unit calculates the weight ratio of the hidden state at the previous moment and the new candidate state at the current moment, and outputs it after taking a weighted average between the previous moment and the current moment; The calculation formula of the update unit is as follows: U t = σ ( W z ·[ h t-1 , x t ]+ b z ); in, U t is the output result of the update unit at the current moment, σ is the preset activation function, W z is the weight matrix, h t-1 is the hidden state at the previous moment, x t is the input data at the current moment, b z is the specified bias term; The formula for outputting the weighted average between the previous moment and the current moment by the update unit is as follows: f t =(1- U t )* h t-1 + U t *h t ; in, f t It is the output value of the update unit after weighted average between the previous moment and the current moment.

7. The motion error compensation method of a surgical robot according to claim 1, characterized in that: The specific process of performing inverse kinematics solution to obtain the inverse kinematics solution result in step S5 is as follows: S51: converting the corresponding real-time error compensation amounts of the constraint points and end points of the robot arm into real-time error compensation vectors, and using them as the initial population; S52: Randomly select two different individuals in the initial population, scale their vector differences, and perform vector synthesis with the individual to be mutated; S53: setting a crossover probability, and randomly selecting individuals through a crossover operation based on the crossover probability, and selecting individuals that meet preset indicators as new individuals; S54: setting a mutation probability, and performing a mutation operation based on the mutation probability; S55: Iteratively execute steps S52-S54 to iteratively update the population until a preset requirement is met or a preset maximum number of iterations is reached.

8. The motion error compensation method of a surgical robot according to claim 7, characterized in that: The formula for the initial population in step S51 is: { X i (0)∣ x ij L ≤ x ij (0) ≤ x ij u ; i =1,2,···NP, j =1,2,···D}; in, X i (0) is i Individuals, j For the j dimension, x ij L Indicates j The lower bound of dimension, x ij u Indicates j The upper bound of dimension, x ij (0)= x ij L + rand (0, 1), rand (0, 1) represents a random number in the interval [0, 1].

9. A motion error compensation system for a surgical robot, used to implement a motion error compensation method for a surgical robot according to any one of claims 1 to 8, characterized in that: It includes a data acquisition module, a data analysis module, a mechanical arm kinematics model, an error compensation model, an inverse kinematics solution module and a control command generation module, wherein the data acquisition module is connected to the data analysis module, the mechanical arm kinematics model is connected to the error compensation model, the error compensation model is connected to the inverse kinematics solution module, and the inverse kinematics solution module is connected to the control command generation module; The data acquisition module is used to collect motion data of each constraint point and end point of the dual mechanical arms of the surgical robot, and transmit it to the data analysis module; The data analysis module is used to process and analyze the actual motion data of each constraint point and end point of the dual robotic arms, compare the actual motion data of each constraint point and end point with the standard motion data, determine whether the error between the corresponding constraint point and end point is within the error range, and obtain the constraint points and end points of each of the robotic arms that are not within the error range; The kinematic model of the robot arm is constructed based on the constraint points and end points of the two robot arms; The error compensation model is used to obtain the real-time error compensation amount of each constraint point and end point; The inverse kinematics solution module is used to perform inverse kinematics solution on the corresponding real-time error compensation amounts of the constraint points and end points of the corresponding robotic arms based on the two robotic arm kinematic models to obtain an inverse kinematics solution result; The control command generation module converts the inverse kinematics solution results into corresponding control commands and transmits them to the dual robotic arms of the surgical robot. The dual robotic arms of the surgical robot perform corresponding actions based on the corresponding control commands.

Citation Information

Patent Citations

  • Series-parallel connection robot tail end posture closed-loop control method based on angle sensor

    CN109291051A

  • Control method and device of multi-joint mechanical arm, electronic equipment and storage medium

    CN115781690A

  • Position sensitive error compensation method for industrial robot end tool calibration

    CN117047780A

  • Method for predicting and compensating absolute positioning error of industrial robot under influence of multiple factors

    CN117773940A

  • Positioning error compensation method for six-axis industrial robot

    CN118848963A

Cited By

  • Robot master-slave control method and system for multi-instrument cooperative operation in narrow anatomical channel

    CN121926696A