Spatial position layout method and system for dual-robot assisted limb rehabilitation exercise
By establishing a dual-robot assisted limb rehabilitation motion system model and utilizing genetic optimization algorithms and collision detection methods, the spatial layout of the dual robots and the human body is optimized, solving the problem of low efficiency in existing technologies and maximizing the collaborative workspace volume and safety.
Patent Information
- Application Number
- CN202510011840.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-01-03
AI Technical Summary
In existing technologies, the spatial layout of dual-robot assisted limb rehabilitation exercises is inefficient, has poor optimization effects, and makes it difficult to ensure a safe collaborative workspace between the robot and the human body.
By obtaining the initial positional layout parameters between the two robots and the human body, a model of a dual-robot assisted limb rehabilitation motion system is established. The spatial positional layout parameters are adjusted using a genetic optimization algorithm and a collision detection method to optimize the relative positional relationship between the robots and the human body. An optimization objective function is then constructed to maximize the volume of the collaborative workspace.
The optimal spatial layout between the two robots and the human body was achieved, maximizing the collaborative workspace volume, meeting the needs of rehabilitation training, improving layout efficiency and optimization effect, and ensuring safety.
Smart Images

Figure CN119939812B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of double-robot space position layout optimization, in particular to a double-robot assisted limb rehabilitation movement space position layout method and system. BACKGROUND
[0002] In the field of rehabilitation treatment, using robots to assist human body in limb movement has gradually become an essential method. However, under the existing technical conditions, the space position layout relationship between the robot and the human body often depends on the experience of technical personnel and repeated experimental operations, which makes it quite difficult to achieve the optimal layout of the human-robot collaboration workspace. Especially in the specific scenario involving double-robot assisted unilateral limb rehabilitation movement, it is particularly crucial to accurately optimize the space position layout parameters of the robot and the robot, and the robot and the human body. In addition, it is also necessary to fully consider the collision detection problem between robots to ensure that the volume of the collaboration workspace is maximized while meeting the safety requirements in the rehabilitation training process. SUMMARY
[0003] The purpose of the present application is to provide a double-robot assisted limb rehabilitation movement space position layout method and system, which can solve the problems of low efficiency and poor optimization effect of the workspace layout in the prior art.
[0004] To achieve the above-mentioned purpose, the present application provides the following solutions:
[0005] In a first aspect, the present application provides a double-robot assisted limb rehabilitation movement space position layout method, comprising:
[0006] Obtaining initial position layout parameters between double robots and a human body; the double robots include a first robot and a second robot.
[0007] According to the initial position layout parameters, a double-robot assisted unilateral limb rehabilitation movement system model is established; the double-robot assisted unilateral limb rehabilitation movement system model includes a plurality of space position layout parameters to be optimized; the space 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] According to the initial position layout parameters and the space position layout parameters to be optimized, the volume of the collaboration workspace of the double robots and the upper limbs of the human body is determined; the collaboration workspace volume includes a first collaboration workspace volume of the first robot and the upper arm of the upper limb of the human body, and a second collaboration workspace volume of the second robot and the forearm of the upper limb of the human body.
[0009] According to the first collaborative workspace volume and the second collaborative workspace volume, a dual-robot spatial position layout optimization objective function is constructed based on the spatial position layout parameter to be optimized.
[0010] Based on a genetic optimization algorithm and a collision detection method, a weight parameter of the first collaborative workspace volume and the second collaborative workspace volume in the dual-robot spatial position layout optimization objective function is adjusted to obtain an optimal spatial position layout parameter; the optimal spatial position layout parameter is a spatial position layout parameter that maximizes the weighted total workspace volume.
[0011] In a second aspect, the present application provides a dual-robot assisted limb rehabilitation exercise spatial position layout system, comprising:
[0012] A layout parameter acquisition module is configured to acquire an initial position layout parameter between the dual-robot and the human body; the dual-robot comprises a first robot and a second robot.
[0013] A model establishment module is configured to establish a dual-robot assisted unilateral limb rehabilitation exercise system model according to the initial position layout parameter; the dual-robot assisted unilateral limb rehabilitation exercise system model comprises 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.
[0014] A volume calculation module is configured to determine a collaborative workspace volume of the dual-robot and the human upper limb according to the initial position layout parameter and the spatial position layout parameter to be optimized; the collaborative workspace volume comprises a first collaborative workspace volume of the first robot and the human upper limb upper arm and a second collaborative workspace volume of the second robot and the human upper limb forearm.
[0015] An objective function construction module is configured to construct a dual-robot spatial position layout optimization objective function based on the spatial position layout parameter to be optimized according to the first collaborative workspace volume and the second collaborative workspace volume.
[0016] An objective optimization module is configured to adjust a weight parameter 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 an optimal spatial position layout parameter; the optimal spatial position layout parameter is a spatial position layout parameter that maximizes the weighted total workspace volume.
[0017] According to the specific embodiments provided by the present application, the following technical effects are disclosed:
[0018] The application provides a spatial position layout method and system for double-robot assisted limb rehabilitation exercise, and by acquiring initial position layout parameters between the double robots and the human body, a mathematical model for representing the spatial position layout relationship of the double-robot assisted single-limb rehabilitation exercise system can be established. The model includes a plurality of spatial position layout parameters to be optimized, which are used to determine the position relationship between the robots and the human body. By determining the cooperative workspace volume of the double robots and the upper limbs of the human body, including the first cooperative workspace volume of the first robot and the upper arm of the upper limb of the human body and the second cooperative workspace volume of the second robot and the forearm of the upper limb of the human body, an optimization objective function can be constructed. The application adjusts the weight parameters in the objective function by using a genetic algorithm and a collision detection method, so that the optimal spatial position layout parameters can be obtained, thereby solving the problems of low spatial layout efficiency and poor optimization effect of the robots and the human body. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0020] Figure 1 A flowchart of a spatial position layout method for double-robot assisted limb rehabilitation exercise provided by an embodiment of the present application.
[0021] Figure 2 A coordinate system diagram of an FR5 robot provided by an embodiment of the present application.
[0022] Figure 3 A coordinate system diagram of each joint of the upper limbs of the human body provided by an embodiment of the present application.
[0023] Figure 4 A spatial coordinate transformation diagram provided by an embodiment of the present application.
[0024] Figure 5 A distribution function point cloud distribution diagram provided by an embodiment of the present application.
[0025] Figure 6 A workspace point cloud diagram of the upper limbs of the human body and the double robots provided by an embodiment of the present application.
[0026] Figure 7 A relationship diagram of the size of a voxel and the relative volume change provided by an embodiment of the present application.
[0027] Figure 8A genetic algorithm optimization flowchart provided by an embodiment of the present application.
[0028] Figure 9 A raw convergence curve and a higher-order polynomial fitting curve diagram provided by an embodiment of the present application.
[0029] Figure 10 A 3D scatter plot with a heat map element provided by an embodiment of the present application.
[0030] Figure 11 A functional module schematic diagram of a spatial position layout system of a dual-robot assisted limb rehabilitation movement provided by an embodiment of the present application. DETAILED DESCRIPTION
[0031] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0032] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0033] Embodiment One
[0034] As shown in the figure, the embodiment provides a spatial position layout method of a dual-robot assisted limb rehabilitation movement, comprising: Figure 1
[0035] Step 101: Obtain initial position layout parameters between the dual-robot and the human body; the dual-robot comprises a first robot and a second robot.
[0036] Step 102: According to the initial position layout parameters, establish a dual-robot assisted unilateral limb rehabilitation movement system model; the dual-robot assisted unilateral limb rehabilitation movement system model comprises 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.
[0037] Step 103: According to the initial position layout parameters and the spatial position layout parameters to be optimized, determine the cooperative working space volume of the dual-robot and the upper limbs of the human body; the cooperative working space volume comprises a first cooperative working space volume of the first robot and the upper arm of the upper limbs of the human body and a second cooperative working space volume of the second robot and the forearm of the upper limbs of the human body.
[0038] Step 104: constructing a dual-robot spatial position layout optimization objective function based on the spatial position layout parameters to be optimized according to the first collaborative workspace volume and the second collaborative workspace volume.
[0039] Step 105: adjusting 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.
[0040] In some embodiments, when steps 101-102 are performed, the following can be specifically implemented:
[0041] As shown in Figure 2 , 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 the dual-robot assisted single-limb operation. Before the operation, the preliminary spatial position layout between the dual-robot and the human body needs to be completed first, that is, the initial position layout parameters between the dual-robot and the human body are obtained.
[0042] Specifically, as shown in Figure 2 , 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. The base coordinate system of the first robot is taken 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 shoulder joint coordinate system of the human upper limb relative to the base coordinate system of the first robot is [-n, -m, (b+c-h)].
[0043] wherein c and h are fixed values, h is the height of the human body trunk, and can be set by a doctor according to individual differences; the spatial position layout parameters to be optimized include the separation distance n+p between the first robot and the second robot and the minimum distance m between the human body and the connecting line of the first robot and the second robot. Therefore, the spatial position layout between the dual-robot and the human body is completed, that is, the best spatial position layout parameters [m, n, p] are found.
[0044] In some embodiments, when step 103 is performed, the following can be specifically implemented:
[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 the base coordinate system of the respective robot, and the base coordinate system of the second robot is transformed into the base coordinate system of the first robot, 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 limb, the coordinate system of each joint of the human upper limb is established, the forearm center and the upper arm center in 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, to obtain the pose 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.
[0047] Based on the radius correction function, point cloud sets are respectively solved for the end working space of the first robot, the end working space of the second robot, the upper arm center working space of the human upper limb, and the forearm center working space of the human upper limb, and the collaborative working space point cloud sets are respectively solved for the end working space of the first robot and the upper arm center working space of the human upper limb, and the end working space of the second robot and the forearm center working space of the human upper limb.
[0048] According to the collaborative working space point cloud sets of the end working space of the first robot and the upper arm center working space of the human upper limb, and the end working space of the second robot and the forearm center working space of the human upper limb, a voxel method is used to calculate the collaborative working space volume; the voxel method is used to determine the optimal voxel size by quantifying the volume change through the relative error; the relative error is determined by the relative change between the volume calculated by the current voxel method and the previous volume.
[0049] Specifically, for robots, human upper limbs, forearms, and upper arms are respectively analyzed for kinematics.
[0050] Figure 3 The coordinate system of the robot is shown. According to the principle of spatial coordinate transformation, the conversion between two coordinate systems can be achieved by translation and rotation. Therefore, the relationship between adjacent joint coordinate systems can be represented as a product relationship based on the translation and rotation of the motion coordinate system:
[0051]
[0052] Using formula (1), this embodiment derives a general formula for coordinate transformation between adjacent links:
[0053]
[0054] In the formula, i is the i-th link of the robot, θ i is the angle range of the i-th joint; di Let a be the offset of the i-th joint along the Z-axis; i Let α be the length of the i-th link; i Let be the torsional angle between the i-th link and the next link.
[0055] Based on the DH parameters of the FR5 robot arm (as shown in Table 1), the transformation formula of the robot's end effector relative to the base coordinate system was further derived:
[0056]
[0057] in, The r represents the pose transformation matrix of the robot's adjacent joint coordinate systems; 11 r 12 r 13 r 21 r 22 r 23 r 31 r 32 and r 33 p represents the spatial attitude information of the end effector of the second robot relative to the base coordinate system of the first robot. 2x p 2y and p 2z This represents the spatial position information of the end effector 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] link i ]] i (°)]]> d i (mm) a (mm) 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 the human upper limb, this embodiment establishes a coordinate system for the upper limb. Combining these coordinate systems with the DH parameters in Table 2, the transformation formulas for the centers of the upper arm and forearm relative to the shoulder joint base coordinate system are derived:
[0061]
[0062] In the formula, The homogeneous coordinate transformation matrix representing 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 'represents the orientation of the upper arm relative to the shoulder joint base coordinate system in the human upper limb; r 11 ”、r 12 ”、r13 21 22 23 31 32 33 x y z T x y z T represent the position of the human forearm and upper arm in three-dimensional space in the shoulder coordinate system. The other parts express their poses in the corresponding coordinate systems.
[0063] Table 2. D-H parameters and joint angle ranges of human upper limb
[0064] Link i (°)]]> d i (mm) a (mm) i (°) Shoulder joint (internal / 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 / external rotation) [0,100] 0 L2 90
[0065] Using formulas (4), (5), with the help of MATLAB software and the improved Monte Carlo point cloud solving method, after inputting the joint angle information, the working space point cloud set of the robot end effector can be easily obtained.
[0066] In order to analyze the working space of the human hand upper limb and the second robot in the world coordinate system (as shown in the definition of Figure 3 , a transformation matrix formula (6) is involved, which contains a rotation matrix W A W R and a translation matrix W T W , which is used to maintain the consistency of the direction from the shoulder or second robot coordinate system to the world coordinate system:
[0067]
[0068] x y z T represent 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, the present embodiment focuses on the spatial layout parameters, so in order to further illustrate, 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, R2 in formula (8) and formula (9) represent the shoulder, the world coordinate system and the coordinate system of the second robot respectively. These formulas and matrices help the embodiment accurately describe and analyze the relative positions and postures of the human hand and the robot in the collaborative environment, and thus better plan and optimize their workspaces.
[0072] Wherein, the double robot end, upper limb forearm center position, upper limb upper arm center position workspace point cloud solving and point cloud uniform distribution are as follows:
[0073] With the continuous progress 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, especially suitable for handling work environments with irregular shapes or unknown boundaries, and has high flexibility. However, when reaching the ideal accuracy, numerical methods usually require a large number of sample points, which increases the amount of calculation. In addition, in spherical or similar spherical workspaces, the point cloud generated by numerical methods is often unevenly distributed, especially in the peripheral area, the point cloud density is low, while in the central area, the density is high. This uneven distribution can lead to inaccurate contouring, 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 directly proportional to the cube of its radius, simply using a random function can cause the point cloud to be overly concentrated in the central region of the sphere, i.e. there are too many points in the small radius region near the center of the sphere, and too few points in the large radius region at the periphery of the sphere, resulting in a point cloud distribution that is sparse at the periphery and dense at the center. In order to achieve uniform distribution of the point cloud within the sphere, the embodiment proposes a method to modify the generated radius to adapt to the characteristics of the sphere volume changing with the radius. Based on this, the embodiment proposes a radius modification type distribution function, aiming to explore an effective way to achieve uniform distribution of the point cloud.
[0075] Specifically, the radius modification function expression of the sphere or sphere-like object is as follows:
[0076] r m =radius×rand() 1 / 3 (10).
[0077] To verify the effect of the distribution function, the embodiment takes a sphere with a center coordinate of [0, 0, 0] and a radius of 500 mm as an example, and calculates the distribution of the point cloud, as shown in (a) and (b) of FIG. 10. Figure 5 As can be seen, when using the rand function, there are more grid point clouds near the center of the sphere, and fewer grid points near the outer contour of the sphere. In contrast, the point cloud generated using the radius modification function has a more uniform number of points in each grid inside the sphere.
[0078] Wherein, the first robot end and the upper arm center position of the upper limb cooperate to work space point cloud, the second robot end and the upper arm center position of the upper limb cooperate to work space point cloud to solve, specifically can as follows
[0079] Respectively through the first robot end and the upper arm center position of the upper limb cooperate to work space point cloud, the second robot end and the upper arm center position of the upper limb cooperate to work space point cloud to carry out intersection calculation, can obtain two parts of the cooperative work space point cloud set. As Figure 6 The hand upper limb and the work space point cloud diagram of double robot as shown. Wherein, (a) is the point cloud of cooperative work space 1 to express in blue, is obtained by the intersection of the red first robot and the green upper arm, and the point cloud formed by the intersection of the second robot and the forearm constitutes cooperative work space 2. (b) is the point cloud diagram of all work spaces in Z=600 plane. (c) is the point cloud diagram of the first robot, forearm and cooperative work space 1 in Z=600 plane.
[0080] Wherein, according to the cooperative work space point cloud set of the first robot and the upper arm of the human upper limb and the cooperative work space point cloud set of the second robot and the forearm of the human upper limb, voxel method is adopted to calculate the volume of the cooperative work space, which can be specifically as follows:
[0081] After obtaining the uniformly distributed point cloud data set, the next step is to quantitatively calculate the volume of the work space. Voxel method is selected to calculate the volume,
[0082] However, too large or too small voxel may affect the accuracy and efficiency of the calculation. With the decrease of voxel size, the calculation accuracy is improved, but the calculation load and time are also increased; on the contrary, the increase of voxel size will lead to the expansion of grid volume, which reduces the accuracy. Therefore, under the limited computing resources, it is critical to select an optimal voxel size that balances accuracy and calculation time. For this purpose, 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, and 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] As Figure 7As shown in the figure, it can be observed that when the voxel size is increased to 4.5, further increase of the voxel size results in very small volume change, and the relative error does not exceed the set threshold of 1%, indicating that the volume change tends to be stable. Therefore, the voxel size 4.5 is determined as the optimal size in this embodiment. In fact, when the voxel size is 4.5, the volume error compared with the standard volume calculated by the formula is only 1.15%. This result verifies the feasibility of the method of this embodiment, that is, the relative error is used to evaluate the volume change, and the optimal voxel size is quickly determined. In addition, when processing large-scale point cloud data sets, a part of sample data can be selected to determine the optimal voxel size, which is then used for the calculation of the overall volume. This method lays a foundation for the calculation of the collaborative working space volume between the robot and the upper limbs of the human body.
[0084] In some embodiments, when steps 104-105 are performed, the following can be specifically performed:
[0085] According to the first collaborative working space volume and the second collaborative working space volume, a double-robot spatial position layout optimization objective function is constructed based on a spatial position layout parameter to be optimized.
[0086] Based on a genetic optimization algorithm and a collision detection method, a weight parameter of the first collaborative working space volume and the second collaborative working space volume in the double-robot spatial position layout optimization objective function is adjusted to obtain an optimal spatial position layout parameter; the optimal spatial position layout parameter is a spatial position layout parameter that maximizes the weighted total working space volume.
[0087] Specifically, the spatial position layout parameter [m, n, p] will affect the volume of the collaborative working space between the first robot and the upper arm of the upper limbs of the human body and the collaborative working space between the second robot and the forearm of the upper limbs of the human body. Therefore, a function relationship between the two collaborative working spaces and the spatial position layout parameter is constructed in this embodiment:
[0088] volume_total = volume1 * K1 + volume2 * K2 (11).
[0089] Wherein, volume_total is the weighted sum of the volumes of the two collaborative working spaces, volume1 is the volume of the collaborative working space between the first robot and the upper arm of the upper limbs of the human body, and volume2 is the volume of the collaborative working space between the second robot and the forearm of the upper limbs of the human body. K1 and K2 are weight coefficients, K1 + K2 = 1, which can be adjusted according to the needs of rehabilitation training.
[0090] In order to realize collision detection, the minimum Euclidean distance between the centers of mass of any two robot links is calculated to check potential collisions. In this embodiment, the minimum distance between the centers of mass of any two robot links is calculated as follows: Figure 2In this embodiment, the 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 and are the translational component coordinates of the center of mass transformed coordinate frame of the corresponding link. For each link, its center of mass is usually located at the midpoint between two adjacent joints, and thus can be calculated according to the robot kinematics.
[0093] This embodiment then uses a weighted sum to construct a general objective function, and forms 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 equation (13), k1 and k2 are positive weights and k1 + k2 = 1, representing the relative percentage of the importance of each collaborative workspace; h(x) represents a quantitative calculation function relative to the volume value of the workspace, where x is the argument of the function. P Robot1 , P Robot1 , P Robot1 and P Robot1 represent the workspaces of the first robot, the second robot, the upper arm and the forearm, respectively. Robot1 ∩P upperarm and P Robot2 ∩P forearm represent their respective workspace intersection regions. i min and θ i max represent the joint limit positions of the i-th robot. This embodiment simplifies the robot links to be cylindrical in shape, where r1 j represents the radius of the j-th link in the first robot, r 2kRadius representing the kth link of the second robot. r 1j + r 2k , as a 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, by setting a penalty mechanism, the layout parameters under the corresponding configuration are excluded from the further optimization process. Specifically, the objective function incorporates this logic, returning a workspace volume of 0 if a collision is detected, effectively discarding these solutions.
[0099] Based on this, the embodiment constructs an optimization objective function with the weighted sum of the two collaborative workspace volumes, and solves the optimal layout parameters [m, n, p].
[0100] The convergence criterion is satisfied when one of the following two conditions is met: the evolution reaches an upper limit or the fitness function f of the algebra g satisfies the following condition:
[0101] |f * (g+1)-f * (g)|<σ (16).
[0102] Where f(g) is the fitness value of the optimal individual in the gth generation, and the function tolerance σ is a very small positive number. The condition here means that if the difference between the fitness values of the optimal individuals of two consecutive generations is less than a certain preset small number σ, it is considered that the evolution algorithm has converged.
[0103] Wherein, 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 double-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 optimization algorithm, add the fitness function constraint condition, and set the genetic algorithm related parameters:
[0105] Use the genetic algorithm to optimize the layout parameters 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, and each individual in the population represents a possible combination of layout parameters.
[0108] ② Fitness evaluation: evaluate the advantages and disadvantages of each individual through the fitness function, and the fitness function is the weighted volume calculation function.
[0109] ③ Selection: Select good individuals as parents for reproduction according to fitness.
[0110] ④ Crossover: Perform crossover operation on parent individuals to generate offspring, inheriting part of the characteristics of the parents.
[0111] ⑤ Mutation: Perform mutation operation on offspring individuals to increase population diversity.
[0112] ⑥ Iteration: Repeat the above process until the stopping condition is met.
[0113] where the fitness function of the genetic algorithm is shown in equation (11).
[0114] where the constraint conditions of the fitness function are as follows:
[0115] ① Initial spatial position layout exists in collaborative workspace:
[0116] volume1>0,volume1>0,when[n,m,p]=[n0,m0,p0] (17).
[0117] where n0, m0, p0 are the initial position layout parameter values.
[0118] ② No collision occurs during the motion of the dual robot:
[0119] At any time during the motion, i.e., the separation distance SDmin(P1, P2) > d, P1, P2 are the centers of mass of any link of the two robots in space, and d is the allowed safety distance threshold for the dual robot, which should generally be no less than the sum of the maximum radii of the robot links.
[0120] When the fitness value of an individual does not meet the constraint condition, it is punished to reduce its selection probability. Specifically, the optimization process is as follows Figure 8 The parameters in the genetic algorithm are shown in Table 3:
[0121] Table 3 Genetic algorithm parameter table
[0122] Parameter setting Parameter value Population size 600 Maximum iteration number 500 Crossing probability 0.9 Mutation probability 0.1 Function tolerance 1e6 Initial population range [200,1000]
[0123] After the optimization process, the convergence curve of the fitness function value of the genetic algorithm is drawn to verify the stability of the algorithm. Specifically, it can be as follows:
[0124] In order to verify the stability of the genetic algorithm, the best fitness function value is monitored, and its convergence in the iteration process is analyzed, and the original convergence curve and the higher order polynomial fitting curve are analyzed. As shown in the figure, after about 274 generations, the best fitness function value converges rapidly and stabilizes at a value of about 6.18e7mm 3 , and this stable point isFigure 9 The red "X" marks the end of the genetic algorithm. This indicates that the algorithm has reached a stable performance level. The results confirm that the genetic algorithm effectively optimizes the layout parameters and maintains consistent performance throughout the iteration process.
[0125] To verify the accuracy of the genetic algorithm's solution, this embodiment uniformly samples the layout parameters within a predefined range and performs a comprehensive search. This ensures that no potential global optimal solution is missed, allowing for a detailed comparison with the genetic algorithm's solution.
[0126] Specifically, this embodiment samples the parameters n, m, and p within the range [200:20:1000] and calculates the workspace volume for each parameter combination. The combination that produces the maximum collaborative workspace volume is identified and compared with the optimal parameters obtained by the genetic algorithm to assess the degree of solution proximity to the global optimum. Table 4 lists the top 10 parameter combinations sorted by volume, with the maximum 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 local optimal solutions.
[0127] Table 4 Top 10 parameter combinations sorted by volume
[0128]
[0129] In addition, this embodiment combines a 3D scatter plot with heat map elements to visualize two relationships: one between n, m, and the total collaborative volume, and the other 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. Figure 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. Within this area, the parameter n is approximately between [560, 760], m is between [200, 360], and p is between [260, 420]. The best configuration obtained by the genetic algorithm falls within this range, further verifying the accuracy of the algorithm in this embodiment.
[0130] Embodiment Two
[0131] As shown in Figure 11 , the embodiment provides a spatial position layout system for double-robot assisted limb rehabilitation movement, comprising:
[0132] The layout parameter acquisition module 1101 is configured to acquire initial position layout parameters between the double robots and the human body; the double robots include a first robot and a second robot.
[0133] The model establishing module 1102 is configured to establish a double-robot assisted single-limb rehabilitation exercise system model according to initial position layout parameters; the double-robot assisted single-limb rehabilitation exercise 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.
[0134] The volume calculating module 1103 is configured to determine a cooperative working space volume of the double robot and the human upper limb according to the initial position layout parameters and the spatial position layout parameters to be optimized; the cooperative working space volume includes a first cooperative working space volume of the first robot and the upper arm of the human upper limb and a second cooperative working space volume of the second robot and the forearm of the human upper limb.
[0135] The objective function constructing module 1104 is configured to construct a double-robot spatial position layout optimization objective function based on the spatial position layout parameters to be optimized according to the first cooperative working space volume and the second cooperative working space volume.
[0136] The objective optimizing module 1105 is configured to adjust the weight parameters of the first cooperative working space volume and the second cooperative working space volume in the double-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 working space volume.
[0137] The volume calculating module 1103 specifically includes:
[0138] The first coordinate system conversion submodule is configured to transform the end of the first robot and the end of the second robot relative to the respective robot base coordinate system 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 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.
[0139] The second coordinate system conversion submodule is configured to establish joint coordinate systems of the human upper limb according to the physiological structure of the human upper limb, transform the forearm center and the upper arm center in the human upper limb 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 to obtain a pose 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 set calculation submodule is configured to calculate point cloud sets of the end workspace of the first robot, the end workspace of the second robot, the forearm center workspace of the upper limbs of the human body, and the upper arm center workspace of the upper limbs of the human body, respectively, based on a radius correction function, and to calculate collaborative workspace point cloud sets of the end workspace of the first robot and the upper arm center workspace of the upper limbs of the human body and the end workspace of the second robot and the forearm center workspace of the upper limbs of the human body, respectively.
[0141] The volume calculation submodule is configured to calculate collaborative workspace volumes of the end workspace of the first robot and the upper arm center workspace of the upper limbs of the human body and the end workspace of the second robot and the forearm center workspace of the upper limbs of the human body, respectively, by using a voxel method, wherein the voxel method is configured to determine an optimal voxel size by quantifying volume changes through a relative error, and the relative error is determined by a relative change between a volume calculated by the current voxel method and a previous volume.
[0142] In summary, the present application has the following technical effects:
[0143] 1) The present application automatically calculates optimal layout parameters of dual robots and human bodies in a collaborative workspace by using a genetic algorithm, fully considers collision detection, thereby maximizing the volume of the collaborative workspace, and meets the needs of rehabilitation physicians for the movement range of the limbs of patients, improves layout efficiency and optimization effect, and has a wide application prospect.
[0144] 2) In view of the problem of sparse distribution of workspace point clouds outside and dense distribution of workspace point clouds inside 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 limbs and the second robot and the forearm of the upper limbs, so as to match the characteristics of the spherical point cloud distribution changing with the radius, thereby realizing uniformization of the point cloud distribution.
[0145] 3) In view of the selection of the voxel size parameter in the voxel method calculation, a sample evaluation method is proposed, which first randomly selects a part of the collaborative workspace point clouds, takes the minimum value of the slope change of the curve as the optimal voxel size value, and then uses the optimal voxel size value to solve the total collaborative workspace volume values of the first robot and the upper arm of the upper limbs and the second robot and the forearm of the upper limbs. By this method, the optimal voxel size value can be quickly found, and compared with using the total data to find the optimal voxel size value, the efficiency is higher and the calculation cost is lower.
[0146] 4) For the problem of personalized rehabilitation training needs, the weight coefficients of the collaborative workspace of the first robot and the upper arm of the upper limb and the second robot and the forearm of the upper limb can be allocated. The physician can manually adjust the weight coefficients according to the patient's condition, such as 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 of the first robot and the upper arm of the upper limb can be increased, so as to obtain a larger volume value of the collaborative workspace of the first robot and the upper arm of the upper limb, and the spatial position layout at this time 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, so the size of the collaborative workspace can be adjusted according to the input of the patient's height information, thereby realizing the personalized adaptive adjustment of the collaborative workspace.
[0147] 5) For the problem of verifying the accuracy of the genetic algorithm for solving the spatial position layout problem, the method of first uniformly sampling the layout parameters in the predefined range to conduct a comprehensive search to ensure that no possible global optimal solution is missed is innovatively proposed; then the 3D scatter plot with heat map elements is used to visualize the relationship between different parameter combinations and the total collaborative volume, further verifying the accuracy of the algorithm.
[0148] The technical features of the above embodiments can be combined in any manner. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present application.
[0149] The principles and implementation modes of the present application are described by using specific examples in this paper, and the above embodiment descriptions are only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed. In conclusion, the content of the present application should not be understood as a limitation.
Claims
1. A spatial layout method for dual-robot assisted limb rehabilitation exercises, characterized in that, The spatial layout method for dual-robot assisted limb rehabilitation exercises includes: Obtain the initial positional layout parameters between the dual robots and the human body; the dual robots include a first robot and a second robot. A dual-robot assisted unilateral limb rehabilitation exercise system model is established based on the initial position layout parameters. The dual-robot assisted unilateral limb rehabilitation exercise system model includes several spatial position layout parameters to be optimized. The spatial position layout parameters are used to determine the relative positional relationship between the first robot and the second robot, the relative positional relationship between the first robot and the human body, and the relative positional relationship between the second robot and the human body. Based on the initial position layout parameters and the spatial position layout parameters to be optimized, the collaborative workspace volume of the two robots and the human upper limb is determined; 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. Based on the volumes of the first and second collaborative workspaces, and the spatial layout parameters to be optimized, a dual-robot spatial layout optimization objective function is constructed. Based on the genetic optimization algorithm and collision detection method, the weight parameters of the first cooperative workspace volume and the second cooperative workspace volume in the objective function of the dual-robot spatial position layout optimization 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. Based on the initial position layout parameters and the spatial position layout parameters to be optimized, the collaborative workspace volume of the dual robots and the human upper limb is determined, specifically including: Based on the principle of spatial coordinate transformation, the end effectors of the first robot and 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, thus obtaining the transformation formulas of the end effectors of the first robot and the second robot relative to the base coordinate system of the first robot; the end effector of the first robot is connected to the upper arm of the human upper limb, and the end effector of the second robot is connected to the forearm of the human upper limb. Based on the physiological structure of the human upper limb, a coordinate system for each joint of the human upper limb is established. The forearm center and upper arm center of the human upper limb are transformed relative to the shoulder joint base coordinate system. The shoulder joint base coordinate system is then transformed into the base coordinate system of the first robot to obtain the pose transformation formula of the forearm center and upper arm center of the human upper limb relative to the base coordinate system of the first robot. The point cloud of the collaborative workspace between the end effector of the first robot and the center position of the upper arm of the human upper limb is solved, and the point cloud of the collaborative workspace between the end effector of the second robot and the center position of the forearm of the human upper limb is solved. Based on the radius correction function, the point cloud sets are solved for the end effector workspace of the first robot, the end effector workspace of the second robot, the center workspace of the forearm of the human upper limb, and the center workspace of the upper arm of the human upper limb, respectively. The point cloud sets of the collaborative workspace between the end effector workspace of the first robot and the center workspace of the upper arm of the human upper limb and the end effector workspace of the second robot and the center workspace of the forearm of the human upper limb are solved. Based on the aggregation of collaborative workspace points between the end-effector workspace of the first robot and the upper arm center workspace of the human upper limb, and the end-effector workspace of the second robot and the forearm center workspace of the human upper limb, the voxel method is used to calculate the volume of the collaborative workspace. The voxel method is used to quantify volume changes and determine the optimal voxel size through relative error. The relative error is determined by the relative change between the volume calculated by the current voxel method and the previous volume.
2. The spatial layout method for dual-robot assisted limb rehabilitation exercises according to claim 1, characterized in that, The initial position layout parameters include the initial relative positions between the first robot and the second robot, the initial relative positions between the first robot and the human body, and the initial relative positions between the second robot and the human body.
3. The spatial layout method for dual-robot assisted limb rehabilitation exercises according to claim 1, characterized in that, The spatial layout parameters to be optimized include the distance between the first robot and the second robot, as well as the minimum distance between the line connecting the first robot and the second robot and the human body.
4. The spatial layout method for dual-robot assisted limb rehabilitation exercises according to claim 1, characterized in that, The objective function for optimizing the spatial layout of the dual robots is as follows: ; in, k 1 and k 2 The values are positive weights, representing the relative percentages of importance of the first and second collaborative workspaces, respectively. k 1 + k 2 = 1; , , and These are the workspaces for the first robot, the second robot, the upper arm, and the forearm, respectively. and These are the intersection areas of the workspaces of the first robot, the second robot, the upper arm, and the forearm; h ( x ) is a quantitative calculation function relative to the volume value of the workspace. x is the independent variable of the function.
5. A spatial positioning layout system for dual-robot assisted limb rehabilitation exercises, characterized in that, include: 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. The model building module is used to build a model of a dual-robot assisted unilateral limb rehabilitation exercise system based on the initial position layout parameters. The dual-robot assisted unilateral limb rehabilitation exercise system model includes several spatial position layout parameters to be optimized. The spatial position layout parameters are used to determine the relative positional relationship between the first robot and the second robot, the relative positional relationship between the first robot and the human body, and the relative positional relationship between the second robot and the human body. The volume calculation module is used to determine the collaborative workspace volume of the two robots and the human upper limb 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. The objective function construction module is used to construct an objective function for optimizing the spatial position layout of the two robots based on the volume of the first collaborative workspace and the volume of the second collaborative workspace, and the spatial position layout parameters to be optimized. The objective optimization module is used to adjust the weight parameters of the first and second cooperative workspace volumes in the objective function of the dual-robot spatial position layout optimization based on the genetic optimization algorithm and the collision detection method, so as 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. The volume calculation module specifically includes: The first coordinate system transformation submodule is used to transform the end effector of the first robot and the end effector 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 to the base coordinate system of the first robot, so as to obtain the transformation formula of the end effector of the first robot and the end effector of the second robot relative to the base coordinate system of the first robot; the end effector of the first robot is connected to the upper arm of the human upper limb, and the end effector of the second robot is connected to the forearm of the human upper limb. The second coordinate system transformation submodule is used to establish the coordinate system of each joint of the human upper limb according to the physiological structure of the human upper limb, transform the forearm center and upper arm center of the human upper limb 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 to obtain the pose transformation formula of the forearm center and upper arm center of the human upper limb relative to the base coordinate system of the first robot. The collaborative workspace point cloud calculation submodule is used to solve the collaborative workspace point cloud of the first robot end effector and the upper arm center position, and the collaborative workspace point cloud of the second robot end effector and the forearm center position. Based on the radius correction function, the point cloud is solved for the end effector workspace of the first robot, the end effector 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. The collaborative workspace point cloud is solved for the end effector workspace of the first robot and the upper arm center workspace of the human upper limb, and the end effector 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 volume of the collaborative workspace based on the aggregation of collaborative workspace points of the end-effector workspace of the first robot and the upper arm center workspace of the human upper limb, and the end-effector workspace of the second robot and the forearm center workspace of the human upper limb, using the voxel method. The voxel method is used to quantify volume changes and determine the optimal voxel size through relative error. The relative error is determined by the relative change between the volume calculated by the current voxel method and the previous volume.