Spatial position layout method and system for double-robot-assisted limb rehabilitation exercise
By establishing a dual robot-assisted unilateral limb rehabilitation movement system model and using genetic optimization algorithms and collision detection methods, the spatial position layout parameters of the dual robot and human body are optimized, and the problems of inefficient layout efficiency and poor optimization effects in the existing technology are solved, achieving the effect of maximizing the volume of collaborative work space and meeting safety needs.
Patent Information
- Application Number
- CN202510011840.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-01-03
AI Technical Summary
In the prior art, the spatial position layout of dual robot assisted limb rehabilitation exercise is inefficient and the optimization effect is poor. Especially in dual robot assisted unilateral limb rehabilitation exercise scenarios, it is difficult to accurately optimize the spatial position layout parameters of robots and robots, robots and human bodies.
By obtaining the initial position layout parameters between the dual robot and the human body, a dual robot assisted unilateral limb rehabilitation movement system model is established to determine the spatial position layout parameters to be optimized. Using genetic optimization algorithm and collision detection method, the weight parameters of the cooperative working space volume in the dual-robot spatial position layout optimization objective function are adjusted to obtain the optimal spatial position layout parameters.
The cooperative working space between the dual robot and the upper limbs of the human body is maximized, the layout efficiency and optimization effect are improved, and the safety needs during rehabilitation training are met.
Smart Images

Figure CN119939812A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of dual-robot spatial position layout optimization, and in particular to a dual-robot assisted limb rehabilitation exercise spatial position layout method and system. Background Art
[0002] In the field of rehabilitation therapy, the use of robots to assist the human body in limb movement has gradually become a vital method. However, under existing technical conditions, the spatial position layout relationship between the robot and the human body often depends on the experience of technicians and repeated experimental operations, which makes it quite difficult to achieve the optimal layout of the human-machine collaborative workspace. Especially in specific scenarios involving dual-robot-assisted unilateral limb rehabilitation exercises, it is particularly important to accurately optimize the spatial position layout parameters between robots and robots, and between robots and humans. In addition, the collision detection problem between robots needs to be fully considered to ensure that the safety requirements of the rehabilitation training process are met while maximizing the volume of the collaborative workspace. Summary of the invention
[0003] The purpose of this application is to provide a spatial position layout method and system for dual-robot assisted limb rehabilitation exercises, which can solve the problems of low efficiency and poor optimization effect of workspace layout in the prior art.
[0004] To achieve the above objectives, this application provides the following solutions:
[0005] In a first aspect, the present application provides a spatial position layout method for dual-robot assisted limb rehabilitation exercise, comprising:
[0006] Acquire initial position layout parameters between a dual robot and a human body; the dual robot includes a first robot and a second robot.
[0007] According to the initial position layout parameters, a dual-robot assisted unilateral limb rehabilitation movement system model is established; the dual-robot assisted unilateral limb rehabilitation movement system model includes a number of spatial position layout parameters to be optimized; the spatial position layout parameters are used to determine the relative position relationship between the first robot and the second robot, the relative position relationship between the first robot and the human body, and the relative position relationship between the second robot and the human body.
[0008] The collaborative workspace volume of the dual robots and the upper limbs of the human body is determined according to the initial position layout parameters and the spatial position layout parameters to be optimized; the collaborative workspace volume includes a first collaborative workspace volume of the first robot and the upper arm of the human upper limb and a second collaborative workspace volume of the second robot and the forearm of the human upper limb.
[0009] According to the first collaborative workspace volume and the second collaborative workspace volume, based on the spatial position layout parameters to be optimized, a dual-robot spatial position layout optimization objective function is constructed.
[0010] Based on a genetic optimization algorithm and a collision detection method, the weight parameters of the first collaborative workspace volume and the second collaborative workspace volume in the dual-robot spatial position layout optimization objective function are adjusted to obtain optimal spatial position layout parameters; the optimal spatial position layout parameters are the spatial position layout parameters that maximize the weighted total workspace volume.
[0011] In a second aspect, the present application provides a spatial position layout system for dual-robot assisted limb rehabilitation exercise, comprising:
[0012] The layout parameter acquisition module is used to acquire the initial position layout parameters between the dual robots and the human body; the dual robots include a first robot and a second robot.
[0013] A model building module is used to establish a dual-robot assisted unilateral limb rehabilitation movement system model according to initial position layout parameters; the dual-robot assisted unilateral limb rehabilitation movement system model includes a number of spatial position layout parameters to be optimized; the spatial position layout parameters are used to determine the relative position relationship between the first robot and the second robot, the relative position relationship between the first robot and the human body, and the relative position relationship between the second robot and the human body.
[0014] The volume calculation module is used to determine the collaborative workspace volume of the dual robots and the upper limbs of the human body according to the initial position layout parameters and the spatial position layout parameters to be optimized; the collaborative workspace volume includes the first collaborative workspace volume of the first robot and the upper arm of the human upper limb and the second collaborative workspace volume of the second robot and the forearm of the human upper limb.
[0015] The objective function construction module is used to construct a dual-robot spatial position layout optimization objective function based on the first collaborative workspace volume and the second collaborative workspace volume and on the spatial position layout parameters to be optimized.
[0016] The target optimization module is used to adjust the weight parameters of the first collaborative workspace volume and the second collaborative workspace volume in the dual-robot spatial position layout optimization objective function based on a genetic optimization algorithm and a collision detection method to obtain optimal spatial position layout parameters; the optimal spatial position layout parameters are the spatial position layout parameters that maximize the weighted total workspace volume.
[0017] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0018] The present application provides a method and system for spatial position layout of dual-robot assisted limb rehabilitation exercise. By obtaining the initial position layout parameters between the dual robots and the human body, a mathematical model can be established to characterize the spatial position layout relationship between man and machine in the dual-robot assisted unilateral limb rehabilitation exercise system. The model includes several spatial position layout parameters to be optimized, which are used to determine the position relationship between robots and between robots and the human body. By determining the collaborative workspace volume of the dual robots and the upper limbs of the human body, including the first collaborative workspace volume between the first robot and the upper arm of the human upper limb and the second collaborative workspace volume between the second robot and the forearm of the human upper limb, an optimization objective function can be constructed. The present application uses genetic algorithms and collision detection methods to adjust the weight parameters in the objective function to obtain the optimal spatial position layout parameters, thereby solving the problems of low efficiency and poor optimization effect of spatial layout between robots and robots and between robots and the human body. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A schematic flow chart of a method for spatial layout of dual-robot assisted limb rehabilitation exercises provided in one embodiment of the present application.
[0021] Figure 2 A schematic diagram of a coordinate system of an FR5 robot provided in one embodiment of the present application.
[0022] Figure 3 A schematic diagram of a coordinate system of joints of a human upper limb provided in one embodiment of the present application.
[0023] Figure 4 A distribution function point cloud distribution diagram provided in one embodiment of the present application.
[0024] Figure 5 A point cloud map of the workspace of a human hand and upper limbs and a dual robot provided in one embodiment of the present application.
[0025] Figure 6 A relationship diagram between voxel size and relative volume change provided in one embodiment of the present application.
[0026] Figure 7 A genetic algorithm optimization flow chart provided for one embodiment of the present application.
[0027] Figure 8A genetic algorithm fitness function value convergence curve diagram provided in one embodiment of the present application.
[0028] Fig. 9 The original convergence curve and a higher-order polynomial fitting curve diagram provided in an embodiment of the present application.
[0029] Fig.10 A 3D scatter plot with heat map elements is provided in one embodiment of the present application.
[0030] Fig.11 A schematic diagram of functional modules of a spatial position layout system for dual-robot assisted limb rehabilitation exercise provided in one embodiment of the present application. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0032] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0033] Embodiment 1
[0034] like Figure 1 As shown, this embodiment provides a spatial position layout method for dual-robot assisted limb rehabilitation exercise, including:
[0035] Step 101: Acquire initial position layout parameters between a dual robot and a human body; the dual robot includes a first robot and a second robot.
[0036] Step 102: Establish a dual-robot assisted unilateral limb rehabilitation movement system model based on the initial position layout parameters; the dual-robot assisted unilateral limb rehabilitation movement system model includes a number of spatial position layout parameters to be optimized; the spatial position layout parameters are used to determine the relative position relationship between the first robot and the second robot, the relative position relationship between the first robot and the human body, and the relative position relationship between the second robot and the human body.
[0037] Step 103: Determine the collaborative workspace volume of the dual robots and the upper limbs of the human body based on the initial position layout parameters and the spatial position layout parameters to be optimized; the collaborative workspace volume includes a first collaborative workspace volume between the first robot and the upper arm of the human upper limb and a second collaborative workspace volume between the second robot and the forearm of the human upper limb.
[0038] Step 104: construct a dual-robot spatial position layout optimization objective function based on the first collaborative workspace volume and the second collaborative workspace volume and on the spatial position layout parameters to be optimized.
[0039] Step 105: Based on the genetic optimization algorithm and the collision detection method, the weight parameters of the first collaborative workspace volume and the second collaborative workspace volume in the dual-robot spatial position layout optimization objective function are adjusted to obtain optimal spatial position layout parameters; the optimal spatial position layout parameters are the spatial position layout parameters that maximize the weighted total workspace volume.
[0040] In some embodiments, when executing steps 101-102, the specific steps may be as follows:
[0041] like Figure 2 As shown, the end of the first robot is connected to the upper arm of the human upper limb, and the end of the second robot is connected to the forearm of the human upper limb, thereby realizing the movement of a single limb assisted by a dual robot. Before the operation, it is necessary to first complete the initial spatial position layout between the dual robots and the human body, that is, to obtain the initial position layout parameters between the dual robots and the human body.
[0042] Specific as Figure 2 As shown, the initial position layout parameters include the initial relative position between the first robot and the second robot, the initial relative position between the first robot and the human body, and the initial relative position between the second robot and the human body. Specifically, the initial relative spatial position relationship is represented by the three-dimensional coordinates of the first robot, the three-dimensional coordinates of the second robot, and the three-dimensional coordinates of the human body. Taking the base coordinate system of the first robot as the world coordinate system, the position of the base coordinate system of the second robot relative to the base coordinate system of the first robot is [-(n+p), 0, 0], and the position of the upper limb shoulder joint coordinate system of the human body relative to the base coordinate system of the first robot is [-n, -m, (b+ch)].
[0043] Among them, c and h are fixed values, h is the height of the human body, which can be set by the doctor according to individual differences; the spatial position layout parameters to be optimized include the interval distance n+p between the first robot and the second robot and the minimum distance m between the human body and the line connecting the first robot and the second robot. Therefore, to complete the spatial position layout between the dual robots and the human body, it is necessary to find the optimal spatial position layout parameters [m, n, p].
[0044] In some embodiments, when executing step 103, the specific steps may be as follows:
[0045] According to the principle of spatial coordinate transformation, the end of the first robot and the end of the second robot are transformed relative to their respective robot base coordinate systems, and the base coordinate system of the second robot is transformed into the base coordinate system of the first robot, so as to obtain the transformation formula of the end of the first robot and the end of the second robot relative to the base coordinate system of the first robot.
[0046] According to the physiological structure of the human upper limbs, the coordinate systems of the joints of the human upper limbs are established, and the forearm center and the upper arm center in the human upper limbs are transformed relative to the shoulder joint base coordinate system, and the shoulder joint base coordinate system is transformed into the base coordinate system of the first robot, and the posture transformation formulas of the forearm center and the upper arm center of the human upper limb relative to the base coordinate system of the first robot are obtained.
[0047] Based on the radius correction function, point clouds are solved for the end workspace of the first robot, the end workspace of the second robot, the upper arm center workspace of the human upper limb and the forearm center workspace of the human upper limb respectively, and the collaborative workspace point cloud sets are solved for the end workspace of the first robot and the upper arm center workspace of the human upper limb, and the end workspace of the second robot and the forearm center workspace of the human upper limb respectively.
[0048] According to the collaborative workspace point cloud set of the end workspace of the first robot and the upper arm center workspace of the human upper limb and the end workspace of the second robot and the forearm center workspace of the human upper limb, the volumes of the collaborative workspaces are calculated respectively by using the voxel method; the voxel method is used to quantify the volume change through relative error to determine the optimal voxel size; the relative error is determined by the relative change between the current volume calculated by the voxel method and the previous volume.
[0049] Specifically, kinematic analysis is performed on the robot, the forearm and the upper arm of the human upper limb and solved respectively.
[0050] Figure 3 The coordinate system of the robot is shown. According to the principle of spatial coordinate transformation, the transformation between two coordinate systems can be achieved through translation and rotation. Therefore, the relationship between adjacent joint coordinate systems can be expressed as the product relationship of translation and rotation based on the motion coordinate system:
[0051]
[0052] Using formula (1), this embodiment derives a general formula for coordinate transformation between adjacent links:
[0053]
[0054] Where i is the i-th link of the robot, θ i is the angle range of the i-th joint; di is the offset of the i-th joint along the Z axis; a i is the length of the i-th connecting rod; α i is the torsion angle between the ith link and the next link.
[0055] Combined with the DH parameters of the FR5 robot arm (as shown in Table 1), the transformation formula of the robot end effector relative to the base coordinate system is further derived:
[0056]
[0057] in, Represents the pose transformation matrix of the robot's adjacent joint coordinate system; r 11 、r 12 、r 13 、r 21 、r 22 、r 23 、r 31 、r 32 and r 33 are the spatial posture information of the end of the second robot relative to the base coordinate system of the first robot, and p 2x 、p 2y and p 2z It represents the spatial position information of the end of the second robot relative to the base coordinate system of the first robot.
[0058] Table 1 Robot DH parameters and joint angle range
[0059] <![CDATA[Link i ]]> <![CDATA[θ i (°)]]> <![CDATA[d i (mm)]]> a(mm) <![CDATA[α i (°)]]> 1 [-179,179] 152 0 90 2 [-269,89] 0 -425 0 3 [-162,162] 0 -395 0 4 [-269,89] 130 0 90 5 [-179,179] 102 0 -90 6 [-179,179] 100 0 0
[0060] Similarly, based on the physiological structure of human upper limbs, this embodiment establishes a coordinate system for the upper limbs. Combining these coordinate systems with the DH parameters in Table 2, the transformation formula of the upper arm and forearm center relative to the shoulder joint base coordinate system is derived:
[0061]
[0062] In the formula, Represents the homogeneous coordinate transformation matrix of the shoulder joint base coordinate system; r 11 '、r 12 '、r 13 '、r 21 '、r 22 '、r 23 '、r 31 '、r 32 ' and r 33 ' are the postures of the upper arms of the human body relative to the coordinate system of the shoulder joint base; r 11 ”、r 12 ”、r13 ”、r 21 ”、r 22 ”、r 23 ”、r 31 ”、r 32 ” and r 33 ” are the postures of the forearm in the upper limb of the human body relative to the shoulder joint base coordinate system, [p x ',p y ',p z '] T and [p x ”,p y ”,p z ”] T They represent the positions of the human forearm and upper arm in the shoulder coordinate system in three-dimensional space, respectively. The other parts express their postures in the corresponding coordinate system.
[0063] Table 2 DH parameters and joint angle ranges of human upper limbs
[0064] link <![CDATA[θ i (°)]]> <![CDATA[d i (mm)]]> a(mm) <![CDATA[α i (°)]]> Shoulder joint (internal rotation / external rotation) [0,100] 0 0 -90 Shoulder joint (abduction / adduction) [-50.00,77.78] 0 0 90 Shoulder joint (flexion / extension) [-50.00,94.44] 0 L1 0 Elbow joint (flexion / extension) [44.44,130.56] 0 0 90 Elbow joint (internal rotation / external rotation) [0,100] 0 L2 90
[0065] By using formulas (4) and (5), with the assistance of MATLAB software and the improved Monte Carlo point cloud solution method, after inputting the joint angle information, this embodiment can easily obtain the workspace point cloud set of the robot end effector.
[0066] In order to analyze the relationship between the human hand and the second robot in the world coordinate system (such as Figure 3 The working space in the definition shown here involves a transformation matrix formula (6), which contains the rotation matrix W A W R and translation matrix W T W , used to maintain the orientation consistency from the shoulder or second robot coordinate system to the world coordinate system:
[0067]
[0068] In the formula, [p x ,p y ,p z ] T Represents the position of the first robot end effector on the x-axis, y-axis, and z-axis in the first robot coordinate system.
[0069] Specifically, this embodiment focuses on the spatial layout parameters, so for further explanation, the corresponding translation matrix from the shoulder and second robot coordinate system to the world coordinate system can be defined as:
[0070]
[0071] The subscripts S, W, and R2 in equations (8) and (9) represent the coordinate system of the shoulder, the world coordinate system, and the coordinate system of the second robot, respectively. These formulas and matrices help this embodiment to accurately describe and analyze the relative positions and postures of the human hand and the robot in a collaborative environment, thereby better planning and optimizing their workspaces.
[0072] Among them, the workspace point cloud solution and point cloud uniform distribution of the dual robot ends, the center position of the upper forearm, and the center position of the upper arm are as follows:
[0073] With the continuous advancement of computer technology, numerical methods have shown significant advantages in generating point clouds. This method uses the Monte Carlo algorithm to efficiently solve complex high-dimensional space problems. It is particularly suitable for dealing with working environments with irregular shapes or unknown boundaries, and has extremely high flexibility. However, numerical methods usually require a large number of sample points to achieve ideal accuracy, which leads to an increase in the amount of calculation. In addition, in spherical or spherical-like working spaces, the point clouds generated by numerical methods are often unevenly distributed, especially in the peripheral areas where the point cloud density is low and the central area is high. This uneven distribution can lead to inaccurate contour drawing, which in turn causes significant errors in volume calculation. Therefore, it is necessary to optimize and adjust the point cloud generated based on the Monte Carlo method.
[0074] Given that the volume of a sphere is proportional to the cube of its radius, simply using a random function may cause the point cloud to be overly concentrated in the center of the sphere, that is, there are too many points in the small radius area near the center of the sphere, and too few points in the large radius area outside the sphere, causing the point cloud distribution to be sparse at the periphery and dense in the center. In order to achieve uniform distribution of the point cloud within the sphere, this embodiment proposes a method for correcting the generated radius to adapt to the characteristic that the volume of the sphere changes with the radius. Based on this, this embodiment proposes a radius-corrected distribution function, which aims to explore effective ways to achieve uniform distribution of point clouds.
[0075] Specifically, the radius correction function expression of a sphere or spherical body is as follows:
[0076] r m = radius × rand() 1 / 3 (10).
[0077] To verify the effect of the distribution function, this embodiment takes a sphere with a center coordinate of [0,0,0] and a radius of 500 mm as an example to calculate the distribution of the point cloud. Figure 5 As shown in (a) and (b) in Figure 1, it can be seen that when the rand function is used, the number of grid point clouds near the center of the sphere is greater, while the number of grid points near the outer contour of the sphere is less. In contrast, the point cloud generated by the radius correction function has a more uniform number of points in each grid inside the sphere.
[0078] Among them, the first robot end and the upper arm center position collaborative workspace point cloud, the second robot end and the upper limb forearm center position collaborative workspace point cloud solution, specifically can be as follows
[0079] By calculating the intersection of the collaborative workspace point cloud between the first robot end and the upper arm center position, and the collaborative workspace point cloud between the second robot end and the upper forearm center position, two sets of collaborative workspace point clouds can be obtained. Figure 6 The point cloud diagram of the workspace of the human hand and the dual robots shown. (a) is the point cloud of collaborative workspace 1 in blue, which is obtained by the intersection of the red first robot and the green upper arm, while the point cloud formed by the intersection of the second robot and the forearm constitutes collaborative workspace 2. (b) is the point cloud diagram of all workspaces in the Z=600 plane. (c) is the point cloud diagram of the first robot, forearm and collaborative workspace 1 in the Z=600 plane.
[0080] The volume of the collaborative workspace is calculated using the voxel method according to the collaborative workspace point cloud set between the first robot and the upper arm of the human upper limb and the collaborative workspace point cloud set between the second robot and the forearm of the human upper limb. Specifically, the volume of the collaborative workspace can be calculated as follows:
[0081] After obtaining a uniformly distributed point cloud dataset, the next step is to quantitatively calculate the volume of the workspace. The voxel method is selected for volume calculation.
[0082] However, voxels that are too large or too small may affect the accuracy and efficiency of the calculation. As the voxel size decreases, the calculation accuracy increases, but the calculation load and time will also increase; on the contrary, an increase in the voxel size will cause the grid volume to expand and reduce the accuracy. Therefore, under limited computing resources, it is critical to select an optimal voxel size that balances accuracy and calculation time. To this end, this embodiment proposes a method: gradually adjust the voxel size within a certain range and calculate the corresponding spatial volume. When the volume change tends to be insignificant, the optimal voxel size can be determined. This embodiment uses relative error to quantify the volume change. The relative error refers to the relative change between the volume calculated by the current voxel method and the previous volume, that is, the percentage change of each volume change relative to the previous volume.
[0083] like Figure 7As shown in the figure, it can be observed that when the voxel size increases to 4.5, the volume change caused by further increasing the voxel size is very small, and the relative error does not exceed the set threshold of 1%, indicating that the volume change tends to be stable. Therefore, this embodiment determines the voxel size of 4.5 as the optimal size. In fact, when the voxel size is 4.5, the volume error is only 1.15% compared with the standard volume calculated by the formula. This result verifies the feasibility of the method of this embodiment, that is, the volume change is evaluated by relative error and the optimal voxel size is quickly determined. In addition, when processing large-scale point cloud data sets, part of the sample data can be selected first to determine the optimal voxel size, and then used to calculate the overall volume. This method lays the foundation for the subsequent calculation of the volume of the collaborative workspace between the robot and the upper limbs of the human body.
[0084] In some embodiments, when executing steps 104-105, the specific steps may be as follows:
[0085] According to the first collaborative workspace volume and the second collaborative workspace volume, based on the spatial position layout parameters to be optimized, a dual-robot spatial position layout optimization objective function is constructed.
[0086] Based on a genetic optimization algorithm and a collision detection method, the weight parameters of the first collaborative workspace volume and the second collaborative workspace volume in the dual-robot spatial position layout optimization objective function are adjusted to obtain optimal spatial position layout parameters; the optimal spatial position layout parameters are the spatial position layout parameters that maximize the weighted total workspace volume.
[0087] Specifically, the spatial position layout parameters [m, n, p] will affect the volume of the collaborative workspace between the first robot and the upper arm of the human upper limb, and the collaborative workspace between the second robot and the forearm of the human upper limb. Therefore, this embodiment constructs a functional relationship between the collaborative workspace of the two and the spatial position layout parameters:
[0088] volume_total=volume1*K1+volume2*K2(11).
[0089] Among them, volume_total is the weighted sum of the volumes of the two collaborative workspaces, volume1 is the collaborative workspace volume of the first robot and the upper arm of the human upper limb, and volume2 is the collaborative workspace volume of the second robot and the forearm of the human upper limb. K1 and K2 are weight coefficients, K1+K2=1, which can be adjusted according to the needs of rehabilitation training.
[0090] To achieve collision detection, this embodiment checks for potential collisions by calculating the minimum Euclidean distance between the centers of mass of any two links of the robots. Figure 2In this embodiment, points P1 and P2 are defined to represent the center of mass of these robot links. The collision detection function calculates the Euclidean distance as follows:
[0091]
[0092] Here is the translation component coordinate of the link’s center of mass after the coordinate system is transformed. For each link, its center of mass is usually located at the midpoint between two adjacent joints, so it can be calculated based on the robot kinematics.
[0093] This embodiment then uses the weighted sum to construct a general objective function and formulates a constrained nonlinear optimization problem:
[0094] f=max(k1·h(P Robot1 ∩P upperarm )+k2·h(P Robot2 ∩P forearm )) (13).
[0095] The constraints are as follows:
[0096] θ i min ≤θ i ≤θ i max (14).
[0097] d>r 1j +r 2k (15).
[0098] In formula (13), k1 and k2 are positive weights and k1+k2=1, indicating the relative percentage of importance of each collaborative workspace; h(x) represents a quantitative calculation function relative to the volume value of the workspace, where x is the independent variable of the function. Robot1 ,P Robot1 ,P Robot1 and P Robot1 Respectively represent the working space of the first robot, the second robot, the upper arm and the forearm. Robot1 ∩P upperarm and P Robot2 ∩P forearm Respectively represent the intersection area of their respective workspaces. i min and θ i max Respectively represent the joint limit positions of the i-th robot. In this embodiment, the robot connecting rod is simplified to a cylindrical shape, where r 1j represents the radius of the jth link in the first robot, r 2k represents the radius of the kth link in the second robot.1j +r 2k , as the collision threshold between any two links from the first robot and 2. When the distance d between the links is below this defined threshold, it indicates a potential collision. In this case, a penalty mechanism is set to exclude the layout parameters under the corresponding configuration from further optimization. Specifically, the objective function incorporates this logic and returns a workspace volume of 0 if a collision is detected, effectively discarding these solutions.
[0099] Based on this, this embodiment constructs a weighted sum of the volumes of the two collaborative workspaces as an optimization objective function to solve the optimal layout parameters [m, n, p].
[0100] The convergence criterion can be satisfied in one of two cases: the evolution reaches an upper limit or the fitness function f of the generation g satisfies the following conditions:
[0101] |f * (g+1)-f * (g)||<σ (16).
[0102] Where f(g) is the fitness value of the best individual in the gth generation, and the function tolerance σ is a very small positive number. The condition here means that if the difference in the fitness values of the best individuals in two consecutive generations is less than a certain preset small value σ, the evolutionary algorithm is considered to have converged.
[0103] Among them, based on the genetic optimization algorithm and the collision detection method, the weight parameters of the first collaborative workspace volume and the second collaborative workspace volume in the dual-robot spatial position layout optimization objective function are adjusted to obtain the optimal spatial position layout parameters; the optimal spatial position layout parameters are the spatial position layout parameters that maximize the weighted total workspace volume, which can be specifically as follows:
[0104] Define the range of layout optimization parameters, use the genetic algorithm to optimize the algorithm, add fitness function constraints, and set genetic algorithm related parameters:
[0105] The layout parameters are optimized using a genetic algorithm to maximize the weighted total workspace volume.
[0106] Specifically, the core idea of the genetic algorithm includes the following steps:
[0107] ① Initialization: Generate an initial population, where each individual in the population represents a possible combination of layout parameters.
[0108] ②Fitness evaluation: The fitness function is used to evaluate the quality of each individual, and the fitness function is a weighted volume calculation function.
[0109] ③Selection: Select excellent individuals as parents for reproduction based on fitness.
[0110] ④Crossover: Perform crossover operation on parent individuals to generate offspring, which inherit some characteristics of the parent.
[0111] ⑤ Mutation: Perform mutation operations on offspring individuals to increase population diversity.
[0112] ⑥ Iteration: Repeat the above process until the stopping condition is met.
[0113] Among them, the fitness function of the genetic algorithm is shown in formula (11).
[0114] Among them, the constraints of the fitness function are as follows:
[0115] ① The initial spatial location layout has collaborative workspace:
[0116] volume1>0, volume1>0, when [n, m, p] = [n0, m0, p0] (17).
[0117] Among them, n0, m0, and p0 are the initial position layout parameter values.
[0118] ② No collision occurs during the movement of the two robots:
[0119] At any time during the motion process, the separation distance SDmin(P1, P2)>d, P1, P2 are the center of mass of any connecting rod of the two robots in space, and d is the allowed dual-robot safety distance threshold, which should generally not be less than the sum of the maximum radii of the robot connecting rods.
[0120] When the fitness value of an individual does not meet the constraints, it is penalized to reduce the probability of being selected. Specifically, the optimization process is as follows Figure 8 As shown, the parameters in the genetic algorithm are shown in Table 3:
[0121] Table 3 Genetic algorithm parameters
[0122] Parameter settings Parameter Value Population size 600 Maximum number of iterations 500 Crossover probability 0.9 Mutation probability 0.1 Function Tolerance 1e6 Initial population range [200,1000]
[0123] After the optimization process, draw the convergence curve of the genetic algorithm fitness function value to verify the stability of the algorithm, which can be done as follows:
[0124] In order to verify the stability of the genetic algorithm, this example monitors the best fitness function value and analyzes its convergence during the iteration process, while analyzing the original convergence curve and the higher-order polynomial fitting curve. As shown in the figure, after about 274 generations, the best fitness function value quickly converges and stabilizes at about 6.18e7 mm 3 The value of this stable point is Figure 8The results confirm that the genetic algorithm effectively optimizes the layout parameters and maintains consistent performance throughout the iterations.
[0125] In order to verify the accuracy of the solution obtained by the genetic algorithm, this embodiment uniformly samples the layout parameters within a predefined range and conducts a comprehensive search to ensure that no potential global optimal solution is missed, so that a detailed comparison can be made with the solution of the genetic algorithm.
[0126] Specifically, this embodiment samples parameters n, m, and p in the range [200:20:1000] and calculates the workspace volume for each parameter combination. The combination that produces the largest collaborative workspace volume is identified and compared with the optimal parameters obtained by the genetic algorithm to evaluate how close the solution is to the global optimum. Table 4 lists the top 10 parameter combinations sorted by volume, with the largest volume being 6.21e7 cubic millimeters. The best result calculated by the genetic algorithm is very close to this maximum value, with a relative error of no more than 1.57%, which confirms that the genetic algorithm successfully avoids the local optimal solution.
[0127] Table 4 Top 10 parameter combinations sorted by volume
[0128]
[0129] In addition, this embodiment combines a 3D scatter plot with a heat map element to visualize two relationships: one is the relationship between n, m and the total collaborative volume, and the other is the relationship between n, p and the total collaborative volume. In both graphs, the scatter points represent different parameter combinations, and the color mapping reflects the corresponding volume values. Fig.10 The dark yellow areas in (a) and (b) indicate where the volume reaches its maximum value, representing the global optimal solution and its neighboring points. This embodiment highlights these areas with red boxes. In this region, the parameter n is approximately between [560, 760], m is between [200, 360], and p is between [260, 420]. The optimal configuration obtained by the genetic algorithm falls within this range, further verifying the accuracy of the algorithm in this embodiment.
[0130] Embodiment 2
[0131] like Fig.11 As shown, this embodiment provides a spatial position layout system for dual-robot assisted limb rehabilitation exercise, including:
[0132] The layout parameter acquisition module 1101 is used to acquire the initial position layout parameters between the dual robots and the human body; the dual robots include a first robot and a second robot.
[0133] The model building module 1102 is used to establish a dual-robot assisted unilateral limb rehabilitation movement system model according to the initial position layout parameters; the dual-robot assisted unilateral limb rehabilitation movement system model includes a number of spatial position layout parameters to be optimized; the spatial position layout parameters are used to determine the relative position relationship between the first robot and the second robot, the relative position relationship between the first robot and the human body, and the relative position relationship between the second robot and the human body.
[0134] The volume calculation module 1103 is used to determine the collaborative workspace volume of the dual robots and the upper limbs of the human body based on the initial position layout parameters and the spatial position layout parameters to be optimized; the collaborative workspace volume includes the first collaborative workspace volume of the first robot and the upper arm of the human upper limb and the second collaborative workspace volume of the second robot and the forearm of the human upper limb.
[0135] The objective function construction module 1104 is used to construct a dual-robot spatial position layout optimization objective function based on the first collaborative workspace volume and the second collaborative workspace volume and on the spatial position layout parameters to be optimized.
[0136] The target optimization module 1105 is used to adjust the weight parameters of the first collaborative workspace volume and the second collaborative workspace volume in the dual-robot spatial position layout optimization objective function based on the genetic optimization algorithm and the collision detection method to obtain the optimal spatial position layout parameters; the optimal spatial position layout parameters are the spatial position layout parameters that maximize the weighted total workspace volume.
[0137] The volume calculation module 1103 specifically includes:
[0138] The first coordinate system conversion submodule is used to transform the end of the first robot and the end of the second robot relative to their respective robot base coordinate systems according to the principle of spatial coordinate transformation, and transform the base coordinate system of the second robot into the base coordinate system of the first robot, so as to obtain the transformation formula of the end of the first robot and the end of the second robot relative to the base coordinate system of the first robot.
[0139] The second coordinate system conversion submodule is used to establish the coordinate systems of the joints of the human upper limbs according to the physiological structure of the human upper limbs, transform the forearm center and the upper arm center in the human upper limbs relative to the shoulder joint base coordinate system, and transform the shoulder joint base coordinate system to the base coordinate system of the first robot, so as to obtain the posture transformation formula of the forearm center and the upper arm center of the human upper limb relative to the base coordinate system of the first robot.
[0140] The collaborative workspace point cloud calculation submodule is used to solve the point cloud sets for the end workspace of the first robot, the end workspace of the second robot, the forearm center workspace of the human upper limb and the upper arm center workspace of the human upper limb based on the radius correction function, and to solve the collaborative workspace point cloud sets for the end workspace of the first robot and the upper arm center workspace of the human upper limb and the end workspace of the second robot and the forearm center workspace of the human upper limb.
[0141] The volume calculation submodule is used to calculate the volumes of the collaborative workspaces respectively by using the voxel method based on the collaborative workspace point cloud set of the end workspace of the first robot and the upper arm center workspace of the human upper limb and the end workspace of the second robot and the forearm center workspace of the human upper limb; the voxel method is used to quantify the volume change by relative error to determine the optimal voxel size; the relative error is determined by the relative change between the current volume calculated by the voxel method and the previous volume.
[0142] In summary, this application has the following technical effects:
[0143] 1) This application uses a genetic algorithm to automatically calculate the optimal layout parameters of the dual robots and the human body in the collaborative workspace, fully considering collision detection, thereby maximizing the volume of the collaborative workspace and meeting the rehabilitation physician's needs for the patient's limb motion range, improving the layout efficiency and optimization effect, and has broad application prospects.
[0144] 2) In order to solve the problem of sparse outside and dense inside of the workspace point cloud distribution caused by the traditional Monte Carlo method, an improved Monte Carlo numerical analysis method is proposed to correct the collaborative workspace point cloud distribution functions of the first robot and the upper arm of the upper limb, and the second robot and the forearm of the upper limb, respectively, to match the characteristics of the sphere point cloud distribution that changes with the radius, thereby achieving uniform point cloud distribution.
[0145] 3) In order to select the voxel size parameter in the voxel method calculation, a sample evaluation method is proposed. First, a part of the collaborative space point cloud is randomly selected, and the minimum change in the slope of the curve is used as the value of the optimal voxel size. Then, the optimal voxel size value is used to solve the total collaborative workspace volume value of the first robot and the upper arm of the upper limb, and the second robot and the forearm of the upper limb. This method can quickly find the optimal voxel size value, which is more efficient and has lower computational cost than using overall data to find the optimal voxel size value.
[0146] 4) In response to the problem of personalized rehabilitation training needs, weight coefficients can be allocated to the collaborative workspaces between the first robot and the upper arm of the upper limb, and between the second robot and the forearm of the upper limb. The physician can manually adjust the weight coefficient according to the patient's condition. For example, patients with shoulder joint injuries may focus more on the rehabilitation training of the forearm of the upper limb. At this time, the weight coefficient of the collaborative workspace between the first robot and the upper arm of the upper limb can be increased to obtain a larger volume value of the collaborative workspace between the first robot and the upper arm of the upper limb. At this time, the spatial position layout will provide a larger collaborative workspace for the rehabilitation training of the forearm. In addition, the layout parameters in the height direction are directly related to the height of the human body. Therefore, the size of the collaborative workspace can be adjusted according to the input of the patient's height information, thereby realizing personalized adaptive adjustment of the collaborative workspace.
[0147] 5) To verify the accuracy of genetic algorithms in solving spatial layout problems, we innovatively proposed to first conduct a comprehensive search by uniformly sampling layout parameters within a predefined range to ensure that no possible global optimal solution is missed; then use a 3D scatter plot with heat map elements to visualize the relationship between different parameter combinations and the total collaborative volume, which further verifies the accuracy of the algorithm.
[0148] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0149] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A spatial position layout method for dual-robot assisted limb rehabilitation exercise, characterized in that: The spatial position layout method of a dual-robot assisted limb rehabilitation exercise comprises: Acquiring initial position layout parameters between a dual robot and a human body; the dual robot comprises a first robot and a second robot; According to the initial position layout parameters, a dual-robot assisted unilateral limb rehabilitation movement system model is established; the dual-robot assisted unilateral limb rehabilitation movement system model includes a plurality of spatial position layout parameters to be optimized; the spatial position layout parameters are used to determine the relative position relationship between the first robot and the second robot, the relative position relationship between the first robot and the human body, and the relative position relationship between the second robot and the human body; Determine the collaborative workspace volume of the dual robots and the upper limbs of the human body according to the initial position layout parameters and the spatial position layout parameters to be optimized; the collaborative workspace volume includes a first collaborative workspace volume of the first robot and the upper arm of the human upper limb and a second collaborative workspace volume of the second robot and the forearm of the human upper limb; According to the first collaborative workspace volume and the second collaborative workspace volume, based on the spatial position layout parameters to be optimized, constructing a dual-robot spatial position layout optimization objective function; Based on a genetic optimization algorithm and a collision detection method, the weight parameters of the first collaborative workspace volume and the second collaborative workspace volume in the dual-robot spatial position layout optimization objective function are adjusted to obtain optimal spatial position layout parameters; the optimal spatial position layout parameters are the spatial position layout parameters that maximize the weighted total workspace volume.
2. A spatial position layout method for dual-robot assisted limb rehabilitation exercise according to claim 1, characterized in that: The initial position layout parameters include an initial relative position between the first robot and the second robot, an initial relative position between the first robot and the human body, and an initial relative position between the second robot and the human body.
3. The spatial position layout method of dual-robot assisted limb rehabilitation exercise according to claim 1, characterized in that: The spatial position layout parameters to be optimized include the interval distance between the first robot and the second robot and the minimum distance between the line connecting the first robot and the second robot and a human body.
4. The spatial position layout method of dual-robot assisted limb rehabilitation exercise according to claim 1, characterized in that: According to the initial position layout parameters and the spatial position layout parameters to be optimized, the collaborative workspace volume of the dual robots and the upper limbs of the human body is determined, including: According to the principle of spatial coordinate transformation, the end of the first robot and the end of the second robot are transformed relative to the base coordinate system of each robot, and the base coordinate system of the second robot is transformed into the base coordinate system of the first robot, so as to obtain the transformation formula of the end of the first robot and the end of the second robot relative to the base coordinate system of the first robot; According to the physiological structure of the human upper limb, the coordinate systems of the joints of the human upper limb are established, the forearm center and the upper arm center of the human upper limb are transformed relative to the shoulder joint base coordinate system, and the shoulder joint base coordinate system is transformed into the base coordinate system of the first robot, and the posture transformation formula of the forearm center and the upper arm center of the human upper limb relative to the base coordinate system of the first robot is obtained; Based on the radius correction function, point clouds are respectively solved for the end workspace of the first robot, the end workspace of the second robot, the forearm center workspace of the human upper limb, and the upper arm center workspace of the human upper limb, and collaborative workspace point clouds are respectively solved for the end workspace of the first robot and the upper arm center workspace of the human upper limb, and the end workspace of the second robot and the forearm center workspace of the human upper limb; According to the collaborative workspace point cloud set of the end workspace of the first robot and the upper arm center workspace of the human upper limb and the end workspace of the second robot and the forearm center workspace of the human upper limb, the volumes of the collaborative workspaces are calculated respectively by using the voxel method; the voxel method is used to quantify the volume change through relative error to determine the optimal voxel size; the relative error is determined by the relative change between the current volume calculated by the voxel method and the previous volume.
5. The spatial position layout method of dual-robot assisted limb rehabilitation exercise according to claim 4, characterized in that: The transformation formula of the end of the second robot relative to the base coordinate system of the first robot is specifically: According to the formula The transformation of the end points of the dual robots relative to the coordinate systems of their respective robot bases is expressed as the cumulative multiplication of the position and posture transformations of the coordinate systems of adjacent joints of the robots; in, Represents the pose transformation matrix of the robot's adjacent joint coordinate system; r 11 、r 12 、r 13 、r 21 、r 22 、r 23 、r 31 、r 32 and r 33 are the spatial posture information of the end of the second robot relative to the base coordinate system of the first robot, and p 2x 、p 2y and p 2z It represents the spatial position information of the end of the second robot relative to the base coordinate system of the first robot.
6. The spatial position layout method of dual-robot assisted limb rehabilitation exercise according to claim 4, characterized in that: The posture transformation formula of the upper arm center of the human upper limb relative to the base coordinate system of the first robot is specifically: in, Represents the homogeneous coordinate transformation matrix of the shoulder joint base coordinate system; r 11 '、r 12 '、r 13 '、r 21 '、r 22 '、r 23 '、r 31 '、r 32 ' and r 33 ' are the postures of the upper arms of the human body relative to the coordinate system of the shoulder joint base; [p x ',p y ',p z '] T Represents the position of the human upper arm in the shoulder coordinate system in three-dimensional space.
7. The spatial position layout method for dual-robot assisted limb rehabilitation exercise according to claim 4, characterized in that: The posture transformation formula of the forearm center of the human upper limb relative to the base coordinate system of the first robot is specifically: in, Represents the homogeneous coordinate transformation matrix of the shoulder joint base coordinate system; r 11 ”、r 12 ”、r 13 ”、r 21 ”、r 22 ”、r 23 ”、r 31 ”、r 32 ” and r 33 ” are the postures of the forearms in the upper limbs of the human body relative to the coordinate system of the shoulder joint base; [p x ”,p y ”,p z ”] T Represents the position of the human forearm in the shoulder coordinate system in three-dimensional space.
8. The spatial position layout method of dual-robot assisted limb rehabilitation exercise according to claim 1, characterized in that: The dual-robot spatial position layout optimization objective function is specifically: f=max(k1·h(P Robot1 ∩P upperarm )+k2·h(P Robot2 ∩P forearm )); Wherein, k1 and k2 are positive weights, which are the relative percentages of the importance of the first collaborative workspace and the second collaborative workspace, respectively, k1+k2=1; P Robot1 , P Robot1 , P Robot1 and P Robot1 are the working spaces of the first robot, the second robot, the upper arm and the forearm respectively; P Robot1 ∩P upperarm and P Robot2 ∩P forearm are the intersection areas of the workspaces of the first robot, the second robot, the upper arm and the forearm respectively; h(x) is a quantitative calculation function relative to the volume value of the workspace, and x is the independent variable of the function.
9. A spatial position layout system for dual-robot assisted limb rehabilitation exercise, characterized in that: include: A layout parameter acquisition module, used to acquire the initial position layout parameters between the dual robots and the human body; the dual robots include a first robot and a second robot; A model building module, used to build a dual-robot assisted unilateral limb rehabilitation movement system model according to initial position layout parameters; the dual-robot assisted unilateral limb rehabilitation movement system model includes a number of spatial position layout parameters to be optimized; the spatial position layout parameters are used to determine the relative position relationship between the first robot and the second robot, the relative position relationship between the first robot and the human body, and the relative position relationship between the second robot and the human body; A volume calculation module is used to determine the collaborative workspace volume of the dual robots and the upper limbs of the human body according to the initial position layout parameters and the spatial position layout parameters to be optimized; the collaborative workspace volume includes a first collaborative workspace volume of the first robot and the upper arm of the human upper limb and a second collaborative workspace volume of the second robot and the forearm of the human upper limb; An objective function construction module is used to construct a dual-robot spatial position layout optimization objective function based on the first collaborative workspace volume and the second collaborative workspace volume and the spatial position layout parameters to be optimized; The target optimization module is used to adjust the weight parameters of the first collaborative workspace volume and the second collaborative workspace volume in the dual-robot spatial position layout optimization objective function based on a genetic optimization algorithm and a collision detection method to obtain optimal spatial position layout parameters; the optimal spatial position layout parameters are the spatial position layout parameters that maximize the weighted total workspace volume.
10. A spatial position layout system for dual-robot assisted limb rehabilitation exercise according to claim 9, characterized in that: The volume calculation module specifically includes: A first coordinate system conversion submodule is used to transform the end of the first robot and the end of the second robot relative to the base coordinate system of each robot according to the principle of spatial coordinate transformation, and transform the base coordinate system of the second robot into the base coordinate system of the first robot, so as to obtain a transformation formula of the end of the first robot and the end of the second robot relative to the base coordinate system of the first robot; The second coordinate system conversion submodule is used to establish the coordinate systems of the joints of the human upper limbs according to the physiological structure of the human upper limbs, transform the forearm center and the upper arm center of the human upper limbs relative to the shoulder joint base coordinate system, and transform the shoulder joint base coordinate system into the base coordinate system of the first robot, so as to obtain the posture transformation formula of the forearm center and the upper arm center of the human upper limb relative to the base coordinate system of the first robot; A collaborative workspace point cloud set calculation submodule is used to solve the point cloud sets for the end workspace of the first robot, the end workspace of the second robot, the forearm center workspace of the human upper limb and the upper arm center workspace of the human upper limb respectively based on the radius correction function, and solve the collaborative workspace point cloud sets for the end workspace of the first robot and the upper arm center workspace of the human upper limb and the end workspace of the second robot and the forearm center workspace of the human upper limb respectively; The volume calculation submodule is used to calculate the volumes of the collaborative workspaces respectively by using the voxel method based on the collaborative workspace point cloud set of the end workspace of the first robot and the upper arm center workspace of the human upper limb and the end workspace of the second robot and the forearm center workspace of the human upper limb; the voxel method is used to quantify the volume change by relative error to determine the optimal voxel size; the relative error is determined by the relative change between the current volume calculated by the voxel method and the previous volume.
Citation Information
Patent Citations
Mechanical arm positioning optimization method and device, computer equipment and storage medium
CN114851185A
Double-robot-assisted upper limb single-side rehabilitation training system and control method thereof
CN116966058A
Method for identifying rock ballast in tunnel excavation process, terminal equipment and medium
CN116993995A
GCN-based three-dimensional object recognition and pose estimation method and device
WO2024076023A1
Cited By
Human body upper limb inverse solution calculation method based on multi-objective redundant solution optimization
CN120862708A