An upper limb rehabilitation training trajectory planning method and system
Patent Information
- Application Number
- CN202611362183.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-03
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]本申请提供一种上肢康复训练轨迹规划方法及系统,解决了现有技术存在康复训练轨迹缺乏匀速段设计且未考虑人机交互力的技术问题
[0015]本申请提供的上肢康复训练轨迹规划方法及系统,通过构建包含匀速段的分段轨迹模型并施加二阶连续性约束,在保证轨迹平滑的同时提供稳定的匀速康复刺激期;通过将康复安全约束嵌入参数求解过程,使轨迹天然具备防痉挛、防冲击的生理安全属性;通过引入阻抗模型对参考轨迹进行自适应修正,配合力阈值触发与角度限位保护,实现了被动训练与柔顺修正的自动切换,既响应患者主动意图又防止二次损伤,显著提升了康复训练的人机共融性与安全性。
Smart Images

Figure CN122997943A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robot control technology, and in particular to a method and system for planning upper limb rehabilitation training trajectories. Background Technology
[0002] Upper limb rehabilitation robots are crucial devices for assisting patients with limb motor dysfunction in rehabilitation training. Regarding trajectory planning, current technologies typically employ a single high-order polynomial interpolation method to plan joint motion trajectories. However, such trajectories lack a stable uniform velocity phase between the start and end points, leaving the patient constantly accelerating or decelerating, failing to provide continuous and uniform isokinetic rehabilitation stimulation. In terms of human-machine interaction, existing rehabilitation robots mostly employ pure position control modes, neglecting the interactive forces generated by the patient's active movement intentions. When the patient recovers some muscle strength and exhibits an active movement tendency, significant interactive forces arise between the limb and the robot, potentially causing secondary injury. Therefore, existing technologies suffer from the technical problems of lacking a uniform velocity phase in the rehabilitation training trajectory and failing to consider human-machine interactive forces, resulting in patients not receiving uniform and effective rehabilitation stimulation and posing a risk of secondary injury due to excessive interactive forces. Summary of the Invention
[0003] This application provides a method and system for planning upper limb rehabilitation training trajectories, which solves the technical problems of existing technologies that lack uniform speed segment design for rehabilitation training trajectories and do not consider human-computer interaction forces.
[0004] To achieve the above objectives, this application adopts the following technical solution: Firstly, a method for planning upper limb rehabilitation training trajectories is provided, comprising: acquiring path nodes for upper limb rehabilitation training; the path nodes are preset end-position coordinates in Cartesian space; constructing a segmented trajectory model based on the path nodes; the segmented trajectory model includes acceleration segments, uniform segments, and deceleration segments, the acceleration and deceleration segments are constructed using polynomials of degree no less than five that satisfy continuous boundary conditions for position, angular velocity, and angular acceleration; the uniform segments are constructed using linear functions, and the transition points between adjacent segments satisfy continuous position, angular velocity, and angular acceleration; based on rehabilitation safety constraints and the continuity of angular velocity and angular acceleration between adjacent segments, solving for the duration and polynomial coefficients of each segment of the segmented trajectory model to obtain the reference trajectory for each joint; the rehabilitation safety constraints include joint angular velocity thresholds, joint angular acceleration thresholds, and jerk threshold constraints; adaptively correcting the reference trajectory based on the contact force and impedance model between the patient's limb and the exoskeleton device collected by force sensors to obtain the desired trajectory; the impedance model is a mass-damped-spring system model including target inertia, target damping, and target stiffness.
[0005] The upper limb rehabilitation training trajectory planning method provided in this application constructs a segmented trajectory model containing uniform speed segments and applies continuity constraints at transition points, enabling the rehabilitation trajectory to have smooth motion while providing a stable uniform speed rehabilitation stimulation period. By embedding rehabilitation safety constraints into the trajectory parameter solving process, the generated reference trajectory naturally possesses physiological safety attributes such as anti-spasticity and anti-impact. By introducing an impedance model to adaptively correct the reference trajectory, the robot can perceive and comply with the patient's active movement intentions, enhancing the compliance of human-computer interaction while ensuring the standardization of training. This effectively solves the technical problems of traditional rigid trajectory planning being unable to respond to the dynamic needs of patients and potentially causing secondary damage due to excessive interaction forces.
[0006] In conjunction with the first aspect mentioned above, in one possible implementation, the acceleration and deceleration segments are constructed using polynomials of degree no less than five that satisfy continuous boundary conditions for position, angular velocity, and angular acceleration. This includes: setting the trajectory expressions for the acceleration and deceleration segments as fifth-degree polynomials; constructing a system of coefficient equations based on the boundary conditions of the starting and ending points and the continuity conditions of the transition points between adjacent segments; and solving the system of coefficient equations to obtain the coefficients of each term of the fifth-degree polynomial.
[0007] In conjunction with the first aspect mentioned above, in one possible implementation, a set of coefficient equations is constructed based on the boundary conditions of the starting and ending points and the continuity conditions of the transition points between adjacent segments. This includes: constructing a first set of boundary conditions based on the position, angular velocity, and angular acceleration at the starting point; constructing a second set of boundary conditions based on the position, angular velocity, and angular acceleration at the ending point; constructing a third set of constraint conditions based on the continuity conditions of the position, angular velocity, and angular acceleration of the acceleration segment and the uniform segment, or the uniform segment and the deceleration segment, at the transition points between adjacent segments; and simultaneously solving the first set of boundary conditions, the second set of boundary conditions, and the third set of constraint conditions to construct a set of six linear equations as the coefficient equations.
[0008] In conjunction with the first aspect mentioned above, in one possible implementation, based on rehabilitation safety constraints and the continuity of angular velocity and angular acceleration between adjacent segments, the duration and polynomial coefficients of each segment of the segmented trajectory model are solved to obtain the reference trajectory of each joint. This includes: setting path nodes in Cartesian space; mapping the path nodes in Cartesian space to joint space based on inverse kinematics to obtain the path points of each joint; constructing a constraint optimization problem based on rehabilitation safety constraints, and jointly solving the duration and polynomial coefficients of each segment of the segmented trajectory model.
[0009] In conjunction with the first aspect mentioned above, in one possible implementation, a constrained optimization problem is constructed based on rehabilitation safety constraints, and the duration and polynomial coefficients of each segment of the piecewise trajectory model are jointly solved. This includes: constructing a first objective function with minimizing the peak angular velocity of each joint as the first optimization objective; constructing a second objective function with minimizing the integral of the jerks of each joint as the second optimization objective; and within the feasible region of the rehabilitation safety constraints, jointly solving the duration and polynomial coefficients of each segment of the piecewise trajectory model based on the first objective function and the second objective function.
[0010] In conjunction with the first aspect mentioned above, in one possible implementation, the reference trajectory is adaptively corrected based on the contact force and impedance model between the patient's limb and the exoskeleton device collected by the force sensor to obtain the desired trajectory. This includes: determining whether the contact force is greater than a preset force threshold; when the contact force is greater than the preset force threshold, converting the contact force into a position compensation amount through the impedance model and superimposing the position compensation amount onto the reference trajectory to obtain the desired trajectory; when the contact force is not greater than the preset force threshold, maintaining the reference trajectory as the desired trajectory.
[0011] In conjunction with the first aspect mentioned above, in one possible implementation, the contact force is converted into a position compensation quantity through an impedance model, and the position compensation quantity is superimposed on the reference trajectory to obtain the desired trajectory. This includes: when the contact force acts on the shoulder joint, obtaining the position compensation quantity in Cartesian space through an impedance model; converting the position compensation quantity in Cartesian space to joint space through inverse kinematics to obtain the joint space position compensation quantity; and superimposing the joint space position compensation quantity on the reference trajectory to obtain the desired trajectory.
[0012] In conjunction with the first aspect mentioned above, in one possible implementation, when the contact force is greater than a preset force threshold, the contact force is converted into a position compensation amount through an impedance model, and the position compensation amount is superimposed on the reference trajectory to obtain the desired trajectory. The implementation also includes: determining whether the joint angle change corresponding to the position compensation amount exceeds a preset angle threshold; when the joint angle change exceeds the preset angle threshold, the position compensation amount is truncated and the truncated position compensation amount is superimposed on the reference trajectory to obtain the desired trajectory.
[0013] In conjunction with the first aspect above, in one possible implementation, the values of target inertia, target damping, and target stiffness are configured according to the rehabilitation training stage and the patient's limb impedance characteristics; wherein, the target stiffness is configured to be greater than zero to provide elastic restoring force, and the target damping is configured to be greater than zero to suppress oscillations and ensure that the correction to the reference trajectory converges to zero after the contact force disappears.
[0014] Secondly, an upper limb rehabilitation training trajectory planning system is provided, comprising: a node acquisition module for acquiring path nodes for upper limb rehabilitation training; the path nodes are preset end-position coordinates in Cartesian space; a model construction module for constructing a segmented trajectory model based on the path nodes; the segmented trajectory model includes acceleration segments, uniform segments, and deceleration segments, the acceleration and deceleration segments are constructed using polynomials of degree no less than five that satisfy continuous boundary conditions for position, angular velocity, and angular acceleration; the uniform segments are constructed using linear functions, and the transition points between adjacent segments satisfy continuous position, angular velocity, and angular acceleration; a parameter solving module for solving the duration and polynomial coefficients of each segment of the segmented trajectory model based on rehabilitation safety constraints and the continuity of angular velocity and angular acceleration between adjacent segments, to obtain the reference trajectory for each joint; the rehabilitation safety constraints include joint angular velocity threshold, joint angular acceleration threshold, and jerk threshold constraints; and a trajectory correction module for adaptively correcting the reference trajectory based on the contact force and impedance model between the patient's limb and the exoskeleton device collected by a force sensor, to obtain the desired trajectory; the impedance model is a mass-damped-spring system model including target inertia, target damping, and target stiffness.
[0015] The upper limb rehabilitation training trajectory planning method and system provided in this application constructs a segmented trajectory model containing uniform velocity segments and applies second-order continuity constraints, ensuring trajectory smoothness while providing a stable uniform velocity rehabilitation stimulation period. By embedding rehabilitation safety constraints into the parameter solving process, the trajectory naturally possesses physiological safety attributes such as anti-spasticity and anti-impact. By introducing an impedance model to adaptively correct the reference trajectory, combined with force threshold triggering and angle limit protection, the automatic switching between passive training and compliance correction is realized, which not only responds to the patient's active intentions but also prevents secondary injury, significantly improving the human-machine integration and safety of rehabilitation training.
[0016] It should be understood that the descriptions of technical features, technical solutions, beneficial effects, or similar language in this application do not imply that all features and advantages can be achieved in any single embodiment. Rather, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can be combined in any suitable manner. Those skilled in the art will understand that embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of a particular embodiment. In other embodiments, additional technical features and beneficial effects may be identified in specific embodiments that do not embody all embodiments. Attached Figure Description
[0017] Figure 1A flowchart illustrating an upper limb rehabilitation training trajectory planning method provided in this application embodiment; Figure 2 A flowchart illustrating another upper limb rehabilitation training trajectory planning method provided in this application embodiment; Figure 3 A flowchart illustrating another upper limb rehabilitation training trajectory planning method provided in this application embodiment; Figure 4 A human-computer interaction impedance model diagram provided for embodiments of this application; Figure 5 A diagram illustrating an elbow joint impedance control model provided in this application embodiment; Figure 6 A shoulder joint impedance control model diagram provided in this application embodiment; Figure 7 A system architecture diagram of an upper limb rehabilitation training trajectory planning system provided in this application embodiment; Figure 8 A simulation diagram of a single-joint training angle and angular velocity curve provided for an embodiment of this application; Figure 9 A simulation diagram of a single-joint training angular acceleration curve provided for an embodiment of this application; Figure 10 A simulation diagram illustrating the joint position and velocity curves of a multi-joint training exercise provided in this application embodiment; Figure 11 A simulation diagram illustrating the joint angular velocity and jerk curves of a multi-joint training exercise provided in this application embodiment; Figure 12 A simulation model diagram of a single-joint motor controlled based on the whale algorithm is provided for an embodiment of this application; Figure 13 This is a schematic diagram of the fitness function and motor response state of a WOA-PID under variable speed conditions, provided as an embodiment of this application. Detailed Implementation
[0018] In the description of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "multiple" means two or more. The terms "first," "second," etc., do not limit the quantity or order of execution, and "first," "second," etc., do not necessarily imply differences.
[0019] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0020] Example 1: like Figure 1 As shown in the figure, this application provides a method for planning upper limb rehabilitation training trajectories. This method generates rehabilitation trajectories that balance movement smoothness and safety by constructing a segmented trajectory model and combining it with human-computer interactive force feedback. The process of this method will be described in detail below.
[0021] S101. Obtain the path nodes for upper limb rehabilitation training.
[0022] Among them, the path nodes are the preset end position coordinates in Cartesian space. They refer to a series of key spatial position points that are pre-set in the upper limb rehabilitation training task based on the patient's limb function assessment results or standardized rehabilitation movement library. These points define the geometric path skeleton of rehabilitation movement.
[0023] In this embodiment of the application, the above-mentioned path nodes are obtained by reading rehabilitation data stored in the host computer or controller. These data are usually labeled in the Cartesian coordinate system according to the patient's specific condition, such as the starting point, intermediate transition point and ending point during shoulder flexion training, or multiple transit points in a compound motion trajectory, and the discrete three-dimensional coordinate points are serialized into an ordered planning input vector.
[0024] It should be noted that the path nodes obtained here only represent spatial geometric information and do not include time dimension information. That is, the time, speed or acceleration of arrival at each node has not yet been defined. This leaves room for optimization in the future to flexibly adjust the movement rhythm according to individual patient differences.
[0025] Based on the above steps, by abstracting rehabilitation movements into discrete path nodes in Cartesian space, the rehabilitation intention and specific motion parameters are decoupled, so that the same set of path node data can be adapted to the trajectory planning needs of patients with different body types or different training modes, thereby improving the system's versatility and configuration flexibility.
[0026] S102. Construct a segmented trajectory model based on path nodes.
[0027] The segmented trajectory model is a mathematical description framework that divides the complete rehabilitation exercise process into three sub-intervals with different kinematic characteristics in the time domain. It aims to simulate the start and stop patterns of natural human movement and provide stable training stimuli. The segmented trajectory model includes an acceleration segment, a constant velocity segment, and a deceleration segment. The acceleration and deceleration segments are constructed using polynomials of at least the fifth degree that satisfy the continuous boundary conditions of position, angular velocity, and angular acceleration. The constant velocity segment is constructed using a linear function. The transition points between adjacent segments satisfy the continuity of position, angular velocity, and angular acceleration.
[0028] In this embodiment, the time allocation ratios for acceleration, constant velocity, and deceleration segments are first determined based on the distribution of path nodes. Then, appropriate basis functions are selected to fit each segment. For acceleration and deceleration segments, polynomial functions of order no less than five are used because polynomials of order five and above have sufficient degrees of freedom to simultaneously constrain the positions of the starting and ending points, the first derivative (angular velocity), and the second derivative (angular acceleration), thereby ensuring smooth transitions at the boundaries of the motion state. For constant velocity segments, linear functions are used to ensure that the angular velocity remains constant within this interval, providing uniform and continuous muscle stretch stimulation for the patient. When splicing the functions of each segment, it is mandatory that the position, angular velocity, and angular acceleration values of adjacent segments at the transition point are equal, forming a C2 continuous (second derivative continuous) trajectory curve.
[0029] It should be noted that the segmented trajectory model constructed in this step only establishes the functional form of the trajectory and the continuity constraints, and has not yet determined the specific polynomial coefficients and the duration of each segment. These undetermined parameters will be obtained in subsequent steps in conjunction with safety constraints. Furthermore, although this embodiment preferably uses a fifth-order polynomial to balance computational complexity and smoothness, in scenarios with higher requirements for trajectory smoothness, seventh-order or higher-order polynomials can also be used, as long as the conditions of position, velocity, and acceleration continuity are met. This application does not impose a unique limitation on this.
[0030] Based on the above steps, by constructing a three-segment segmented trajectory model that includes a uniform velocity segment and applying strict second-order continuity constraints at the transition points, the problem of a single high-order polynomial being unable to maintain a stable uniform velocity period is avoided. It also overcomes the mechanical shock and human discomfort caused by the sudden acceleration at the acceleration-deceleration switching point of the traditional trapezoidal velocity curve. From a mathematical structure perspective, this ensures the smoothness of the rehabilitation trajectory and the physiological comfort.
[0031] S103. Based on rehabilitation safety constraints and the continuity of angular velocity and angular acceleration between adjacent segments, solve for the duration and polynomial coefficients of each segment of the segmented trajectory model to obtain the reference trajectory of each joint.
[0032] Among them, rehabilitation safety constraints include joint angular velocity threshold, joint angular acceleration threshold, and slackness threshold constraints. It is a set of upper limits of kinematic parameters set based on the physiological tolerance limit and pathological response characteristics of the human upper limb, which are used to ensure that the planned trajectory will not induce pain, spasm, or secondary injury in the patient.
[0033] In this embodiment, the established continuity conditions and rehabilitation safety constraints together constitute a constrained parametric problem. Specifically, the feasible region is defined by the following boundaries: joint angular velocity not exceeding the anti-spasm threshold, joint angular acceleration not exceeding the inertial injury threshold, and abruptness not exceeding the smoothness threshold. Within this feasible region, the optimal combination of durations for each segment is searched, and the corresponding polynomial coefficients are then solved. The solution process can employ numerical optimization algorithms or analytical methods, ultimately outputting a complete time-joint angle sequence, i.e., the reference trajectory of each joint. This reference trajectory represents the motion commands that the robot should follow under ideal, undisturbed conditions.
[0034] It should be noted that the jerk threshold constraint here does not require zero jerk throughout the entire trajectory (which is physically impossible for a polynomial trajectory), but rather limits the peak or integral value of the jerk within an acceptable range to suppress jitter and abrupt changes during motion. Furthermore, the reference trajectory output in this step is only a kinematic position command and does not include any motor drive voltage, current, or PWM signals, nor does it involve parameter tuning of the underlying servo controller.
[0035] Based on the above steps, by embedding the physiological safety constraints unique to rehabilitation into the trajectory parameter solving process, the generated reference trajectory naturally possesses safety attributes such as anti-spasticity and anti-impact, without relying on later manual adjustments or trial and error based on experience, which significantly improves the adaptability of rehabilitation training programs to individual patient differences and clinical safety.
[0036] S104. Based on the contact force and impedance model between the patient's limb and the exoskeleton device collected by the force sensor, the reference trajectory is adaptively corrected to obtain the desired trajectory.
[0037] Among them, the impedance model is a mass-damped-spring system model that includes target inertia, target damping, and target stiffness. It is a dynamic relationship model that maps human-machine interaction forces into positional deviations. Its physical essence is to simulate the response characteristics of a virtual second-order mass-damped-spring system to external forces, so as to endow the robot with compliant capabilities.
[0038] In this embodiment, force sensor data installed at the exoskeleton joints or end-effectors is read in real time. When a contact force actively applied by the patient is detected, this force is used as input and substituted into the differential equation or transfer function of the impedance model to calculate the corresponding position compensation amount. Subsequently, this position compensation amount is superimposed on the reference trajectory to form a new desired trajectory. This desired trajectory reflects the fusion result of the patient's motion intention at the current moment and the robot's preset path. In the impedance model, the target inertia characterizes the degree of hysteresis in the system's inertial response to force changes, the target damping determines the energy dissipation and oscillation suppression capabilities, and the target stiffness provides the elastic recovery trend after deviating from the reference trajectory.
[0039] Based on the above steps, by introducing an impedance model based on a mass-damped-spring system to perform real-time adaptive correction of the reference trajectory, the robot can perceive and respond to the patient's active movement intentions. This enhances the naturalness and synergy of human-computer interaction while ensuring training safety, and effectively solves the technical shortcomings of traditional rigid trajectory planning in responding to the dynamic needs of patients.
[0040] Based on the above technical solution, a reference trajectory with smoothness, uniform stimulation period and physiological safety is generated at the kinematic level. It is then dynamically adjusted to the desired trajectory that conforms to the patient's intention through a force feedback mechanism. This provides a high-quality and safe instruction basis for subsequent execution layer control and solves the technical problem that existing rehabilitation robot trajectory planning is difficult to balance motion quality and human-computer interaction safety.
[0041] Example 2: In one possible implementation of the embodiments of this application, combined with Figure 1 ,like Figure 2 As shown, the above S102 can be specifically implemented through the following S201, S202 and S203, which are explained in detail below: S201. Set the trajectory expressions for the acceleration and deceleration segments as fifth-degree polynomials.
[0042] The fifth-order polynomial refers to a time function containing six undetermined coefficients, from constant to fifth-order terms. Its selection is based on the stringent requirements for motion smoothness in rehabilitation training. In trajectory planning, to ensure a smooth transition of the robotic arm's motion state at the starting point, ending point, and transition points, constraints must be applied to three physical quantities: position, angular velocity, and angular acceleration. Since each constraint point corresponds to three boundary conditions (position value, first derivative value, and second derivative value), and a complete acceleration / deceleration process involves at least two key states (starting point and ending point), a total of six independent constraints are required. According to the solution conditions of the linear equation system, determining the six unknown coefficients requires exactly six independent equations. Therefore, the fifth-order polynomial is the lowest-order polynomial that satisfies the boundary conditions for position, velocity, and acceleration (i.e., C2 continuity). Compared to the cubic polynomial's inability to constrain acceleration leading to soft impacts, and the computational redundancy and high-frequency oscillation risks associated with seventh-order and higher polynomials, the fifth-order polynomial achieves the optimal balance between smoothness and real-time performance in rehabilitation robot applications.
[0043] In this embodiment, the fifth-order polynomial trajectory expressions for the acceleration and deceleration phases, and their first and second derivatives, satisfy the following formulas:
[0044] in, Indicates time The joint angle, Indicates time The joint angular velocity, Indicates time Joint angular acceleration; , , , , , Let be the coefficients of the fifth-degree polynomial to be solved; This is a time variable relative to the starting time of this trajectory segment, and its value range is... , This represents the duration of the trajectory segment.
[0045] It should be noted that although this embodiment preferably uses a fifth-order polynomial as the basis function for the acceleration and deceleration phases, this is not the only limitation on the scope of protection of this application. In special rehabilitation scenarios where computing power allows or where there are extreme requirements for trajectory smoothness, seventh-order or ninth-order polynomials can also be used to further constrain the continuity of jerk (third derivative), as long as they satisfy "not less than fifth order" and can be solved to obtain uniquely determined coefficients. However, in conventional upper limb rehabilitation training, a fifth-order polynomial is sufficient to eliminate acceleration abrupt changes that cause muscle spasms in patients, and its analytical solution form is simple, facilitating rapid calculation by the embedded controller.
[0046] Based on the above steps, by selecting a fifth-order polynomial as the trajectory generation basis function for the acceleration and deceleration segments, the mathematical structure ensures the complete controllability and continuity of the rehabilitation trajectory in the three dimensions of position, velocity, and acceleration, avoiding the rigid impact caused by low-order interpolation, and providing an accurate analytical model foundation for subsequent safety constraint solutions.
[0047] After determining the basis function forms of each trajectory segment, they need to be integrated into a complete piecewise trajectory model. For exoskeleton upper limb rehabilitation robots with multiple degrees of freedom, the first... The piecewise polynomial rehabilitation training trajectory expression for each joint satisfies the following formula:
[0048] in, , , They represent the first The trajectories of the acceleration, constant speed, and deceleration segments of each joint; They represent the first The trajectory of each joint segment One coefficient; , , , They represent the first The expression defines the starting point, transition time between the acceleration and constant velocity phases, the transition time between the constant velocity and deceleration phases, and the ending point of each joint trajectory. This expression unifies the three trajectories into a complete mathematical framework, where the acceleration and deceleration phases use fifth-degree polynomials to ensure smooth movement, and the constant velocity phase uses a linear function to provide stable isokinetic rehabilitation stimulation.
[0049] After determining the form of the trajectory function, it is necessary to further construct mathematical constraints for solving the coefficients.
[0050] S202. Based on the boundary conditions of the starting and ending points and the continuity conditions of the transition points between adjacent segments, construct a system of coefficient equations.
[0051] More specifically, the construction process includes: constructing a first set of boundary conditions based on the position, angular velocity, and angular acceleration at the starting moment; constructing a second set of boundary conditions based on the position, angular velocity, and angular acceleration at the ending moment; constructing a third set of constraint conditions based on the continuity of the position, angular velocity, and angular acceleration of the acceleration segment and the uniform segment, or the uniform segment and the deceleration segment, at the transition point between adjacent segments; and simultaneously solving the first set of boundary conditions, the second set of boundary conditions, and the third set of constraint conditions to construct a system of six linear equations as the coefficient equations.
[0052] The coefficient equations serve as a bridge between the requirement for continuity of motion in physical space and the linear solution problem in algebraic space. In piecewise trajectory planning, the concepts of "start point" and "end point" are relative: for the acceleration segment, the start point is the initial state of the entire trajectory, and the end point is the "transition point" connecting to the uniform velocity segment; for the deceleration segment, the start point is the "transition point" connecting to the uniform velocity segment, and the end point is the final state of the entire trajectory. The so-called "continuity condition of the transition point" essentially requires that the motion state (position, velocity, acceleration) of the previous trajectory segment at the end time must be strictly equal to the motion state of the next trajectory segment at the beginning time. Since the motion state of the uniform velocity segment is known and constant (velocity is constant, acceleration is zero), the boundary values at the transition points are actually definite known quantities, making the solution of the coefficients of each fifth-degree polynomial a closed definite problem.
[0053] In this embodiment, by substituting the above boundary conditions into the expression for the fifth-degree polynomial and its derivative, the analytical solution of the coefficients can be derived to satisfy the following formula:
[0054] in, , , These represent the position, angular velocity, and angular acceleration at the starting moment of the trajectory segment, respectively. , , These represent the position, angular velocity, and angular acceleration at the end of the trajectory segment, respectively. This indicates the duration of the trajectory segment.
[0055] It should be noted that when this formula is applied to the acceleration phase, it corresponds to the initial state of the constant speed phase at the transition point; when applied to the deceleration phase, it corresponds to the final state of the constant speed phase at the transition point.
[0056] Based on the above steps, by transforming the physical continuity constraint into a standardized system of six linear equations and providing analytical solution formulas, the coefficients of the fifth-order polynomial are solved quickly, accurately, and deterministically. This ensures the continuity of the second derivative at the junction of the acceleration / deceleration segment and the uniform speed segment, eliminating the mechanical impact and human discomfort caused by the unevenness of the trajectory splicing.
[0057] After constructing the system of coefficient equations, the final step is to perform the solution operation.
[0058] S203. Solve the system of coefficient equations to obtain the coefficients of the fifth-degree polynomial.
[0059] Solving the system of coefficient equations refers to using algebraic operations to numerically calculate the coefficients based on known boundary conditions. to The process involves these six specific parameters. This process is the key step in transforming the abstract trajectory planning model into digital instructions that can be executed by the controller.
[0060] In this embodiment, the path node data within the current planning cycle is first read to determine the start and end positions of each segment and the preset constant speed segment time, and then the required duration of each segment is calculated. Subsequently, the start and end state variables will be... and time variables Substituting the analytical formulas, the polynomial coefficients of all joints involved in the motion are calculated in parallel for each trajectory segment. These polynomial coefficients are then encapsulated into a trajectory parameter package and passed to the underlying trajectory interpolator for real-time calculation of the desired joint angle commands within each control cycle.
[0061] Based on the above steps, by efficiently solving the coefficient equation system, the high-level rehabilitation training intentions are accurately transformed into low-level mathematical parameters, completing the translation process from "rehabilitation prescription" to "machine instructions," and providing solid data support for generating high-quality rehabilitation trajectories that are both ergonomic and meet mechanical kinematic constraints.
[0062] Example 3: In one possible implementation of the embodiments of this application, combined with Figure 1 ,like Figure 3 As shown, the above S103 can be implemented through the following S301 and S302, which are explained in detail below: S301. Set path nodes in Cartesian space, and map the path nodes in Cartesian space to joint space based on inverse kinematics to obtain the path points of each joint.
[0063] Inverse kinematics refers to the mathematical process of solving for joint variables (such as joint angles) in reverse, given the position of the robot's end effector in the Cartesian coordinate system. It serves as a bridge connecting abstract rehabilitation movements with specific mechanical motions.
[0064] In this embodiment, a series of Cartesian space path nodes are first set in the human-computer interaction interface or rehabilitation prescription database of the host computer. These nodes intuitively describe the expected motion trajectory of the patient's hand or forearm in three-dimensional space. Subsequently, using the pre-calibrated DH link parameters of the exoskeleton upper limb rehabilitation robot, each Cartesian path point is converted into a corresponding joint angle vector through analytical or numerical methods. For example, for the four-degree-of-freedom serial exoskeleton mechanism involved in this application, the forward kinematic equation is established based on its geometric parameters such as link length, torsion angle, and offset distance, and then the inverse kinematic solution formula is derived. Since the human upper limb movement has highly nonlinear coupling characteristics, direct polynomial interpolation in Cartesian space often leads to uncontrollable distortion of velocity or acceleration in joint space. Therefore, spatial mapping must be completed first to ensure that subsequent trajectory planning is performed in the independent motion dimensions of each joint, thereby ensuring the kinematic continuity at the joint level.
[0065] It should be noted that during inverse kinematics mapping, if multiple solutions are encountered (such as the upper / lower configuration of the elbow joint), the system will automatically select the nearest neighbor solution based on the joint angle state at the previous moment to avoid abrupt changes in the joint angle or crossing singularities. In addition, the mapped joint path points also need to be verified in the workspace to remove invalid points that exceed the physical limits of the joint or the human-machine interference zone, ensuring the feasibility of the planning input.
[0066] Based on the above steps, by non-destructively mapping the rehabilitation intention in Cartesian space to joint space, the risk of kinematic distortion caused by multi-joint coupling is eliminated, providing a correct data foundation for subsequent application of precise safety constraints and smoothness optimization at the joint level.
[0067] S302. Construct a constrained optimization problem based on rehabilitation safety constraints, and jointly solve the duration of each segment and the polynomial coefficients of the segmented trajectory model.
[0068] More specifically, the construction process includes: constructing a first objective function with minimizing the peak angular velocity of each joint as the first optimization objective; constructing a second objective function with minimizing the integral of the jerks of each joint as the second optimization objective; and, within the feasible region of the rehabilitation safety constraints, jointly solving the duration of each segment and the polynomial coefficients of the segmented trajectory model based on the first objective function and the second objective function.
[0069] The constrained optimization problem refers to a mathematical programming problem that seeks the decision variables (in this case, the duration of each segment) that optimize a specific performance index while satisfying a series of inequality constraints (i.e., rehabilitation safety thresholds). The design of the dual objective function aims to balance the safety and comfort of rehabilitation training.
[0070] In this embodiment, considering that a single objective is insufficient to fully characterize the quality of the rehabilitation trajectory, a weighted combination or Pareto optimization strategy is used to handle the dual objectives. Optionally, the first objective function... With the second objective function Satisfy the following formula:
[0071] in, Indicates the first Each joint at any time angular velocity, Indicates the first Each joint at any time The jerk (i.e., the rate of change of angular acceleration). Let be the duration of a single trajectory segment. The first objective function aims to reduce the maximum angular velocity of each joint throughout the entire motion, thereby reducing inertial impact and preventing the induction of muscle stretch reflexes in the patient. The second objective function quantifies and suppresses the degree of jitter during motion by minimizing the integral of the square of the jerkness over the entire time domain, making acceleration and deceleration transitions smoother and more natural. In solving this problem, joint angular velocity thresholds and angular acceleration thresholds are used as hard constraints, and the duration of each segment is used as optimization variables. Sequential quadratic programming (SQP) is used to search for the optimal time allocation scheme within the feasible region, thereby determining the corresponding fifth-order polynomial coefficients.
[0072] It should be noted that this embodiment specifically corrects the problem of "zero jerkiness throughout" in traditional techniques. For a fifth-order polynomial trajectory, its third derivative (jerkiness) is a linear function of time, and cannot be constant at zero except during the uniform velocity segment. Therefore, this application adopts "minimizing the integral of jerkiness" as the optimization objective, which ensures the smoothness of the trajectory while avoiding solution failure or trajectory distortion caused by pursuing an impossible mathematical ideal state. In addition, the weights of the two objectives can be dynamically adjusted according to the rehabilitation stage: during the spastic period, the weight of the first objective function is increased to prioritize safety, and during the recovery period, the weight of the second objective function is increased to improve the smoothness of the movement.
[0073] Based on the above steps, by constructing a dual-objective optimization model that includes peak angular velocity and jerk integral, and solving it jointly under strict physiological safety constraints, the multi-joint rehabilitation trajectory was simultaneously improved in the two dimensions of "anti-spasm" and "high smoothness". This solved the technical problem that traditional single-objective planning could not take into account both safety and comfort, and made the generated reference trajectory truly adapt to the biomechanical characteristics of the human upper limb.
[0074] Example 4: In one possible implementation of this application embodiment, the above-mentioned S104 can be implemented in the following ways, which will be described in detail below: First, the impedance model is explained. The impedance model is a mass-damped-spring system model that includes the target inertia, target damping, and target stiffness, and its parameter configuration satisfies specific physical constraints.
[0075] Among them, the impedance model is essentially a virtual second-order dynamic system used to define the dynamic response characteristics in the human-computer interaction process. Its mathematical expression describes the transmission relationship between external force input and position deviation output.
[0076] In this embodiment, the impedance model is established based on the dynamic principles of a mass-damped-spring system. The rehabilitation trainee is considered as the input to the impedance system. When the force sensor at the end of the robotic arm detects the contact force generated by the patient's active movement intention, the impedance controller can be simplified to a mass-damped-spring system at any joint coordinate. For example... Figure 4 As shown, let The position of the mass block. For the velocity of the mass block, Let the acceleration of the mass be... If the force exerted by the external environment (i.e., the human-machine interaction force) is the force, then the basic dynamic equation of impedance control satisfies the following formula:
[0077] in, The target inertia (mass of the mass block). For target damping (damping of the damper). The target stiffness (spring stiffness). This equation describes the stiffness under external force. The motion response characteristics of the virtual mass-damped-spring system under the action of [the action].
[0078] In actual rehabilitation training, when the external environmental force is... Change to desired contact force At that time, the position, velocity, and acceleration values of the mass block will respectively deviate. ,in For position adjustment amount, For speed adjustment amount, This is the acceleration adjustment. Substituting the above deviation into the basic dynamic equations, the impedance equation in the form of the deviation can be derived:
[0079] in, This represents the deviation between the actual contact force and the desired contact force. This deviation equation shows that the impedance control system is equivalent to a second-order dynamic system with force deviation as input and position deviation as output, taking into account the deviation response in three dimensions: position, velocity, and acceleration.
[0080] Taking the Laplace transform of the above-mentioned impedance equation in the form of deviation (assuming the initial conditions are zero), we get:
[0081] Therefore, the transfer function of the impedance model can be derived to satisfy the following formula:
[0082] in, The Laplace transform of the position compensation quantity The Laplace transform representing the contact force deviation, Represents the Laplace operator. When the desired contact force is... When the value is zero (i.e., there is no intention to actively interact in passive training mode), The transfer function simplifies to:
[0083] Regarding parameter configuration, the target stiffness It must be configured to be greater than zero to provide elastic restoring force after deviating from the reference trajectory, ensuring that the robot tends to return to its original path after deformation under stress; target damping It must also be configured to be greater than zero, and its core functions are twofold: first, to dissipate kinetic energy during the interaction process and suppress system oscillations caused by sudden changes in external forces; second, to ensure that the position compensation amount can smoothly converge to zero over time after the contact force disappears, so that the desired trajectory automatically returns to the reference trajectory and avoids residual deviations. Target inertia The calibration is based on the equivalent mass of the exoskeleton robotic arm and the desired response lag, and is usually set to a small value to ensure the sensitivity of the response.
[0084] Based on the above explanation, by clarifying the physical meaning and configuration constraints of the impedance parameters, the trajectory correction process is endowed with predictable dynamic behavior, especially the zero-point convergence characteristic of the target damping, which ensures that the system can automatically recover to a safe state after losing external excitation and avoids the risk of runaway due to impedance parameter mismatch.
[0085] Based on a defined impedance model, the main process for adaptively correcting the reference trajectory includes: determining whether the contact force is greater than a preset force threshold; when the contact force is greater than the preset force threshold, converting the contact force into a position compensation amount through the impedance model and superimposing the position compensation amount onto the reference trajectory to obtain the desired trajectory; when the contact force is not greater than the preset force threshold, maintaining the reference trajectory as the desired trajectory.
[0086] Among them, the preset force threshold is the criterion for distinguishing between the patient's active movement intention and environmental noise or unconscious muscle tension, and it is also the logic switch that triggers the robot to switch from passive training mode to compliant assist mode.
[0087] In this embodiment, three-dimensional force sensor data installed at the end of the exoskeleton robotic arm or at the joint is read in real time at a fixed sampling frequency, and the raw signal is low-pass filtered to eliminate high-frequency noise interference. Then, the filtered contact force amplitude is compared with a preset force threshold. If the contact force does not exceed the threshold, the system determines that it is currently in a passive training state and directly outputs the generated reference trajectory as the desired trajectory to the underlying controller; at this time, the robot exhibits rigid position tracking characteristics. If the contact force exceeds the threshold, the system determines that the patient has generated a clear intention to move actively or has encountered abnormal resistance, and then activates the impedance control outer loop. The impedance model is used to map the contact force into a position compensation amount in real time, and this compensation is algebraically superimposed onto the original reference trajectory to generate a desired trajectory that conforms to the patient's current force application state.
[0088] To more intuitively illustrate the control structure of the above impedance adaptive correction main process, the position-based impedance control process is given as an example, using the elbow joint as an example. Figure 5 As shown. This control flow employs a dual-loop structure consisting of an outer impedance loop and an inner position loop. Desired pose. Position compensation amount with impedance model output The input for the position control inner loop is obtained by subtraction. The elbow joint is moved by a position controller; the joint angle θ output by the elbow joint is collected by a force sensor to obtain the actual interaction force. , Input impedance controller with differential contact force with the environment (transfer function is) ( Impedance controller output position compensation amount This feedback is then sent to the input, forming a complete force-position closed-loop correction circuit. When the patient does not generate active interaction force, When the impedance is zero, the system degenerates into pure position control; when the patient applies active force, the impedance model converts the force deviation into position offset in real time, so that the desired trajectory conforms to the patient's movement intention.
[0089] Based on the above main process, the accuracy of the trajectory during the passive training phase is guaranteed, and the system is given dynamic adaptability when the patient actively participates, effectively solving the technical defects of traditional rigid planning that cannot respond to the patient's real-time intentions.
[0090] Furthermore, in the step of "converting contact force into position compensation through impedance model", when the contact force is applied to the shoulder joint, the position compensation in Cartesian space is obtained through impedance model; the position compensation in Cartesian space is converted to joint space through inverse kinematics solution to obtain joint space position compensation; the joint space position compensation is superimposed on the reference trajectory to obtain the desired trajectory.
[0091] The application of inverse kinematics here is to solve the spatial dimension mismatch problem caused by the non-coincidence of the shoulder joint force sensor installation position and the joint rotation center. It is a key coordinate transformation link to realize multi-degree-of-freedom impedance control.
[0092] In this embodiment, due to the unique structure of the shoulder joint, the three-dimensional force sensor is typically installed at the upper arm link rather than at the joint axis center. Therefore, the collected contact force and its position compensation calculated using the impedance model are naturally located in Cartesian space (i.e., the end effector coordinate system). The reference trajectory, however, is a joint space sequence existing in the form of joint angles, and the two cannot be directly added. Therefore, it is necessary to first obtain the current joint angle state, establish an inverse kinematics solver using pre-calibrated DH parameters, and then add the position compensation in Cartesian space. Mapped to the corresponding shoulder joint angle compensation values for each degree of freedom. Then, these joint space compensation values are superimposed onto the reference trajectory of the corresponding joint. In contrast, since the sensor mounting axis and rotation axis are basically coincident for the elbow joint, its position compensation value can be directly superimposed in the joint space without this inverse transformation step.
[0093] It should be noted that the inverse transformation here only applies to the incremental signal of position compensation, rather than replanning the entire trajectory. Therefore, the computational load is minimal and fully meets the real-time requirements.
[0094] like Figure 6 As shown, the core difference between the shoulder joint impedance control process and the elbow joint impedance control process lies in the position compensation amount output by the impedance controller. Located in Cartesian space, the force sensor needs to be converted into an angle compensation value in joint space via an inverse kinematics module before being superimposed on the input of the position control inner loop. This transformation solves the spatial dimension mismatch problem caused by the shoulder joint force sensor being installed at the upper arm link and not coinciding with the joint rotation center. The remaining control components (position inner loop, force sensor acquisition, impedance model calculation) are consistent with the elbow joint scheme, thus realizing compliant impedance interaction of the multi-degree-of-freedom shoulder joint.
[0095] Based on the above steps, the problem of control dimension mismatch caused by non-coaxial sensing of the shoulder joint is solved by targeted spatial coordinate transformation. This enables the multi-degree-of-freedom shoulder joint to achieve intuitive impedance interaction like the single-degree-of-freedom elbow joint, significantly improving the flexibility and naturalness of complex joint rehabilitation training.
[0096] Furthermore, before the step of "superimposing the position compensation amount onto the reference trajectory", it is necessary to determine whether the change in joint angle corresponding to the position compensation amount exceeds the preset angle threshold. When the change in joint angle exceeds the preset angle threshold, the position compensation amount is truncated and the truncated position compensation amount is superimposed onto the reference trajectory to obtain the desired trajectory.
[0097] The preset angle threshold is a rigid protection boundary set based on the physiological range of motion and safety margin of the human upper limb joints. It is used to prevent secondary damage caused by the robot pulling the limbs beyond the safe range due to excessive abnormal interaction force.
[0098] In this embodiment, before superimposing the position compensation amount onto the reference trajectory, the change in joint angle corresponding to the compensation amount is calculated and compared with a preset angle threshold. If the change does not exceed the limit, the superposition operation is performed normally; if the change exceeds the threshold, it indicates that the current interaction force may cause hyperextension or hyperflexion of the joint, and the position compensation amount is immediately saturated and truncated, that is, it is forcibly clamped within the range allowed by the preset angle threshold, and then the truncated safety compensation amount is superimposed onto the reference trajectory. This limiting logic, as the last safety line after impedance correction, operates independently of the impedance model itself. Even if the impedance parameters are set improperly or the sensor malfunctions, it can ensure that the output desired trajectory always falls within the physiological safety range.
[0099] Based on the above steps, by embedding an angle limit cutoff mechanism in the trajectory planning layer, a hard safety protection layer independent of the impedance model is constructed, which effectively avoids the risk of joint over-limit caused by abnormal interaction force or algorithm failure, and provides dual safety protection for rehabilitation training.
[0100] Example 5: like Figure 7 As shown in the figure, this application provides an upper limb rehabilitation training trajectory planning system, including: a node acquisition module 701, a model construction module 702, a parameter solving module 703, and a trajectory correction module 704.
[0101] Each of the aforementioned modules is a software functional unit or logic processing unit, and its physical deployment location is flexible. In the embodiments of this application, these modules can all be integrated into the host computer for offline trajectory planning and simulation verification before treatment; they can also be fully or partially embedded in the controller to support real-time online replanning and dynamic adjustment during training; or a distributed architecture can be adopted, for example, deploying the node acquisition module 701 and model building module 702 on the host computer to complete coarse planning, while the computationally intensive parameter solving module 703 and trajectory correction module 704, which have high real-time requirements, are executed on the controller. This hardware-software decoupling design allows the system to adapt to different computing power platforms and clinical workflows, without being limited by specific hardware forms.
[0102] The node acquisition module 701 is used to acquire the path nodes of upper limb rehabilitation training; wherein, the path node is the preset end position coordinate in Cartesian space.
[0103] Specifically, the node acquisition module 701 serves as the system's data entry point, responsible for retrieving standardized rehabilitation movement prescriptions from external storage media, human-computer interaction interfaces, or remote medical cloud platforms. This module not only performs simple data reading operations but also verifies the integrity of the raw data and standardizes the coordinate system, ensuring that the input path node sequence is geometrically continuous and conforms to the feasible kinematic domain of the human upper limb. For example, upon receiving a set of discrete three-dimensional coordinate points, the module automatically detects any abnormal points exceeding the robot's workspace and marks or removes them to prevent subsequent planning failures.
[0104] The model building module 702 is used to build a segmented trajectory model based on path nodes. The segmented trajectory model includes an acceleration segment, a constant velocity segment, and a deceleration segment. The acceleration and deceleration segments are constructed using polynomials of degree no less than five that satisfy continuous boundary conditions for position, angular velocity, and angular acceleration. The constant velocity segment is constructed using a linear function. The transition points between adjacent segments satisfy continuous position, angular velocity, and angular acceleration.
[0105] Specifically, the model building module 702 internally encapsulates a piecewise function generator, which automatically divides acceleration / deceleration intervals and uniform speed intervals based on the input path nodes. This module establishes a mathematical expression framework based on a preset continuity criterion (C2 continuity) and assigns a corresponding basis function type to each trajectory segment. In this embodiment, the module is configured by default as a combination of fifth-order polynomials and linear functions, but interfaces are also reserved to support switching to seventh-order polynomials or other higher-order spline functions, thereby adapting to rehabilitation scenarios with different smoothness requirements without changing the overall system architecture. Its output is a set of structured trajectory description objects containing functional forms and undetermined parameters.
[0106] The parameter solving module 703 is used to solve the duration and polynomial coefficients of each segment of the segmented trajectory model based on rehabilitation safety constraints and the continuity of angular velocity and angular acceleration between adjacent segments, so as to obtain the reference trajectory of each joint; wherein, the rehabilitation safety constraints include joint angular velocity threshold, joint angular acceleration threshold and jerk threshold constraints.
[0107] Specifically, the parameter solving module 703 is the core computing engine of the system. It receives the trajectory description object and preset safety constraint parameters from the model building module 702. This module has a built-in numerical optimizer or analytical calculator. Within the feasible region that satisfies the thresholds for angular velocity, angular acceleration, and jerkiness, it searches for the optimal time allocation scheme and calculates the determined polynomial coefficients.
[0108] The trajectory correction module 704 is used to adaptively correct the reference trajectory based on the contact force and impedance model between the patient's limb and the exoskeleton device acquired by the force sensor to obtain the desired trajectory; wherein, the impedance model is a mass-damped-spring system model that includes target inertia, target damping and target stiffness.
[0109] Specifically, the trajectory correction module 704 serves as the system's safety and interaction interface, monitoring the data stream from the force sensor in real time. When a valid interaction force is detected, this module uses its built-in impedance calculation engine to convert the force signal into a position compensation amount, and then, after safety truncation using angle limit logic, superimposes it onto the reference trajectory. In this embodiment, this module also manages the dynamic configuration of impedance parameters, allowing online adjustment of the target inertia, target damping, and target stiffness values according to the rehabilitation stage. Its output desired trajectory integrates the preset path with the patient's real-time intentions, ensuring both the standardization of training and providing the system with the necessary human-machine compliantness, making it the core component of the entire planning system for achieving safe and compliant training.
[0110] Example 6: In some embodiments, in order to verify the effectiveness and safety of the upper limb rehabilitation training trajectory planning method provided in the above embodiments in actual rehabilitation scenarios, this application embodiment built a four-degree-of-freedom exoskeleton upper limb rehabilitation robot model based on the MATLAB / Simulink simulation platform, and performed full-process simulation verification for single-joint and multi-joint composite rehabilitation training tasks.
[0111] The total training time for a single joint was set to 3 seconds, with a 1-second constant-speed segment. The initial and final velocities and accelerations were constrained to zero, and the maximum joint velocity was limited. Simulation results for the angles and angular velocities of the single-joint rehabilitation training are as follows: Figure 8 As shown, the simulation results of angular acceleration are as follows: Figure 9 As shown. Figure 8 As shown, the left figure is the curve of joint angle changing with time. The joint angle smoothly transitions from 0 rad to approximately 0.14 rad, exhibiting an overall S-shaped transition without inflection points or abrupt changes. The right figure is the curve of angular velocity changing with time. From 0 to 0.5 s is the acceleration phase, where the angular velocity increases from 0 to approximately 0.07 rad / s. From 0.5 to 2 s is the constant velocity phase, where the angular velocity remains constant. From 2 to 3 s is the deceleration phase, where the angular velocity smoothly returns to zero. The three-segment structure is clear, verifying the effectiveness of the acceleration, constant velocity, and deceleration segments in the segmented trajectory model. Figure 9As shown, the angular acceleration initially rises to approximately 0.11 rad / s² during the acceleration phase (0 to 1 s) and then smoothly decreases to zero. During the constant velocity phase (1 to 2 s), it remains zero. During the deceleration phase (2 to 3 s), it initially decreases to approximately -0.12 rad / s² and then smoothly returns to zero. The red dashed lines in the figure mark the transition moments between the acceleration and constant velocity phases, and between the constant velocity and deceleration phases. The angular acceleration at these transition points is continuous without abrupt changes, verifying the effectiveness of the C2 continuity constraint between adjacent phases and avoiding mechanical shock and muscle spasms in the patient caused by sudden acceleration changes.
[0112] For multi-joint complex rehabilitation training tasks, such as Figure 10 As shown, the left figure shows the curves of the joint positions of the four-DOF exoskeleton upper limb rehabilitation robot changing over time. The four joints (joint1 to joint4) start from 0 rad and smoothly transition to their respective target angles within 0 to 5 s. The joints move synchronously and without coupling distortion. The right figure shows the curves of the angular velocity of each joint changing over time. They all exhibit a three-stage characteristic of acceleration-uniform speed-deceleration. During the uniform speed stage (1 to 4 s), the angular velocity remains constant, and the maximum angular velocity is strictly limited within the safety threshold, which verifies the effectiveness of multi-joint cooperative trajectory planning and compliance with safety constraints.
[0113] like Figure 11 As shown, the left figure is the curve of the angular acceleration of each joint changing with time. The angular acceleration transitions continuously at the moment of acceleration and deceleration switching without sudden peaks. The right figure is the curve of the jerk of each joint (the rate of change of angular acceleration) changing with time. The jerk fluctuates near zero and the peak value is within the range of human comfort, which verifies the effectiveness of the optimization objective of minimizing the integral of jerk in this application.
[0114] The simulation verification selected a typical upper limb multi-joint compound movement as the test scenario. This scenario requires the shoulder and elbow joints to work together to smoothly transition from an extension to a flexion state, while including a stable, uniform training period to provide continuous muscle stretch stimulation. In this embodiment, the Cartesian space path nodes are first obtained, and the specific parameters are shown in Table 1, starting point... The coordinates are (66, 0, 5) cm, and the endpoint is... The coordinates are (39.08, 12.70, 51.63) cm, the intermediate transition point. and The starting and ending positions of the uniform velocity segment were defined. Then, following the inverse kinematics mapping strategy, the Cartesian path points were converted into joint space path points, as shown in Table 2. The shoulder flexion-extension angle changed from 0 rad to 0.314 rad, and the elbow flexion-extension angle changed from 0 rad to -0.611 rad. The total training duration was set to 5 seconds, the duration of the uniform velocity segment to 3 seconds, and the joint angular velocity threshold to π / 30 rad / s.
[0115] Table 1
[0116] Table 2
[0117] Example 7: In some embodiments, to further verify the feasibility and control performance of the trajectory planning method of this application at the underlying execution level, a simulation model of single-joint motor control for an exoskeleton upper limb rehabilitation robot was built based on the MATLAB / Simulink platform. The whale optimization algorithm was used to optimize the PID controller parameters (WOA-PID), and the operating state of the joint motor under variable speed conditions was simulated and verified. The structure of the simulation model is as follows: Figure 12 As shown.
[0118] The simulation model consists of a step input module, a PID controller, a joint motor transfer function, a feedback loop, and an ITAE (time-weighted integral of absolute error) evaluation index calculation module. The PID controller includes a proportional element. Points system (Integral and differential elements at 1 / s) (through (Approximate differential); The transfer function of the joint motor is 0.079514 / (0.000000695s²+0.0008078s+0.00712); The ITAE evaluation index is calculated by integrating the product of the absolute value of the control quantity |u| and time, and is used to quantify the time-weighted error performance of the control system, serving as the fitness function of the improved whale optimization algorithm. During simulation, the maximum number of iterations of the improved whale optimization algorithm is set to 80, the population size to 30 (with two subpopulations of 16 and 14 respectively), the maximum inertia weight to 1, and the minimum inertia weight to 0.1. An inertial differential term is used to replace the pure differential term to suppress noise amplification. Simulations of the PID controller optimized based on the WOA algorithm are conducted to verify the operating state of the single-joint motor under variable speed conditions. Its fitness function convergence curve and angular velocity tracking response results are as follows: Figure 13As shown, the left figure is the curve of the fitness function value changing with the number of iterations. The fitness value drops rapidly from an initial value of about 0.11 and converges to about 0.013 after about 28 iterations, indicating that the improved whale optimization algorithm has a fast convergence speed and good global search capability. The right figure is a comparison of the angular velocity tracking response curves of three control methods (PSO-PID (Particle Swarm Optimization PID Parameters), Reference (WOA-PID), and PID) under variable speed conditions. After applying a variable speed disturbance (the speed drops from about 20 rad / s to about 15 rad / s), the magnified view shows that WOA-PID has the smallest overshoot, the shortest settling time, and the smallest steady-state error, which is significantly better than traditional PID and PSO-PID. This verifies the high performance of the underlying motor control and provides a reliable underlying control guarantee for the accurate execution of the trajectory planning method in this application.
[0119] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, disclosure, and appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple instances. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0120] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and modifications of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and modifications.
Claims
1. A method for planning upper limb rehabilitation training trajectories, characterized in that, include: Obtain the path nodes for upper limb rehabilitation training; The path nodes are preset end position coordinates in Cartesian space; A segmented trajectory model is constructed based on the path nodes; the segmented trajectory model includes an acceleration segment, a constant velocity segment, and a deceleration segment. The acceleration segment and the deceleration segment are constructed using polynomials of degree no less than five that satisfy continuous boundary conditions for position, angular velocity, and angular acceleration; the constant velocity segment is constructed using a linear function, and the transition points between adjacent segments satisfy continuous position, angular velocity, and angular acceleration. Based on rehabilitation safety constraints and the continuity of angular velocity and angular acceleration between adjacent segments, the duration and polynomial coefficients of each segment of the segmented trajectory model are solved to obtain the reference trajectory of each joint; the rehabilitation safety constraints include joint angular velocity threshold, joint angular acceleration threshold, and jerk threshold constraints. Based on the contact force and impedance model between the patient's limb and the exoskeleton device collected by the force sensor, the reference trajectory is adaptively corrected to obtain the desired trajectory; the impedance model is a mass-damped-spring system model that includes target inertia, target damping, and target stiffness.
2. The method according to claim 1, characterized in that, The acceleration and deceleration phases are constructed using polynomials of at least degree five that satisfy continuous boundary conditions for position, angular velocity, and angular acceleration, including: The trajectory expressions for the acceleration and deceleration segments are set as fifth-degree polynomials; Based on the boundary conditions of the start and end points and the continuity conditions of the transition points between the adjacent segments, a system of coefficient equations is constructed. Solve the system of coefficient equations to obtain the coefficients of the fifth-degree polynomial.
3. The method according to claim 2, characterized in that, Based on the boundary conditions at the start and end points and the continuity conditions at the transition points between adjacent segments, a system of coefficient equations is constructed, including: The first set of boundary conditions is constructed based on the position, angular velocity, and angular acceleration at the starting moment. Construct a second set of boundary conditions based on the position, angular velocity, and angular acceleration at the endpoint; A third set of constraints is constructed based on the continuity of the position, angular velocity, and angular acceleration of the acceleration segment and the uniform segment, or the uniform segment and the deceleration segment, at the transition point between the adjacent segments. By combining the first set of boundary conditions, the second set of boundary conditions, and the third set of constraints, a system of six linear equations in six variables is constructed as the coefficient equation system.
4. The method according to claim 1, characterized in that, Based on rehabilitation safety constraints and the continuity of angular velocity and angular acceleration between adjacent segments, the duration and polynomial coefficients of each segment of the segmented trajectory model are solved to obtain the reference trajectory of each joint, including: Define the path node in Cartesian space; Based on the inverse kinematics solution, the path nodes in the Cartesian space are mapped to the joint space to obtain the path points of each joint. Based on the aforementioned rehabilitation safety constraints, a constraint optimization problem is constructed, and the duration of each segment and the polynomial coefficients of the segmented trajectory model are solved jointly.
5. The method according to claim 4, characterized in that, The constrained optimization problem constructed based on the rehabilitation safety constraints, and the joint solution of the duration and polynomial coefficients of each segment of the piecewise trajectory model, includes: Construct a first objective function with minimizing the peak angular velocity of each joint as the primary optimization objective; Construct a second objective function with minimizing the integral of the jerkiness of each joint as the second optimization objective; Within the feasible region of the rehabilitation safety constraints, the duration of each segment and the polynomial coefficients of the segmented trajectory model are solved jointly based on the first objective function and the second objective function.
6. The method according to claim 1, characterized in that, The contact force and impedance model between the patient's limb and the exoskeleton device, collected by a force sensor, is used to adaptively correct the reference trajectory to obtain the desired trajectory, including: Determine whether the contact force is greater than a preset force threshold; When the contact force is greater than the preset force threshold, the contact force is converted into a position compensation amount through the impedance model, and the position compensation amount is superimposed on the reference trajectory to obtain the desired trajectory; When the contact force is not greater than the preset force threshold, the reference trajectory is maintained as the desired trajectory.
7. The method according to claim 6, characterized in that, The step of converting the contact force into a position compensation amount using the impedance model and then superimposing the position compensation amount onto the reference trajectory to obtain the desired trajectory includes: When the contact force is applied to the shoulder joint, the position compensation amount in Cartesian space is obtained through the impedance model. The position compensation amount in the Cartesian space is converted to the joint space by inverse kinematics to obtain the joint space position compensation amount. The joint spatial position compensation is superimposed on the reference trajectory to obtain the desired trajectory.
8. The method according to claim 6, characterized in that, The step of converting the contact force into a position compensation amount through the impedance model when the contact force is greater than the preset force threshold, and superimposing the position compensation amount onto the reference trajectory to obtain the desired trajectory, further includes: Determine whether the change in joint angle corresponding to the position compensation amount exceeds a preset angle threshold. When the change in the joint angle exceeds the preset angle threshold, the position compensation amount is truncated and the truncated position compensation amount is superimposed on the reference trajectory to obtain the desired trajectory.
9. The method according to claim 1, characterized in that, The values of the target inertia, the target damping, and the target stiffness are configured according to the rehabilitation training stage and the patient's limb impedance characteristics; wherein, the target stiffness is configured to be greater than zero to provide elastic restoring force, and the target damping is configured to be greater than zero to suppress oscillations and ensure that the correction amount to the reference trajectory converges to zero after the contact force disappears.
10. An upper limb rehabilitation training trajectory planning system, characterized in that, The system includes: The node acquisition module is used to acquire path nodes for upper limb rehabilitation training; the path nodes are preset end position coordinates in Cartesian space. The model building module is used to build a segmented trajectory model based on the path nodes. The segmented trajectory model includes an acceleration segment, a constant velocity segment, and a deceleration segment. The acceleration segment and the deceleration segment are constructed using polynomials of degree no less than five that satisfy continuous boundary conditions for position, angular velocity, and angular acceleration. The constant velocity segment is constructed using a linear function, and the transition points between adjacent segments satisfy continuous position, angular velocity, and angular acceleration. The parameter solving module is used to solve for the duration and polynomial coefficients of each segment of the segmented trajectory model based on rehabilitation safety constraints and the continuity of angular velocity and angular acceleration between adjacent segments, so as to obtain the reference trajectory of each joint; the rehabilitation safety constraints include joint angular velocity threshold, joint angular acceleration threshold and jerk threshold constraints. The trajectory correction module is used to adaptively correct the reference trajectory based on the contact force and impedance model between the patient's limb and the exoskeleton device collected by the force sensor to obtain the desired trajectory; the impedance model is a mass-damped-spring system model that includes target inertia, target damping, and target stiffness.
