Upper and lower limb rehabilitation robot adaptive control method based on brain-computer interface fusion

By collecting EEG signals to quantify motor intentions and combining them with basic state information, the gait frequency and stride parameters of the rehabilitation robot are dynamically adjusted. This solves the problem of fixed gait parameters in existing technologies, and achieves accurate matching of patients' active intentions and optimized training safety.

CN122229658APending Publication Date: 2026-06-19LIZHI MEDICAL TECH (GUANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610506175.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-16
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing control methods for rehabilitation robots generally suffer from fixed gait parameters and the inability to dynamically adjust them in accordance with the patient's real-time status. This results in core parameters such as gait frequency and stride length failing to accurately match the patient's active rehabilitation intentions, leading to insufficient training targeting, low patient participation, and a lack of closed-loop feedback mechanisms. Consequently, there are issues with training safety and system connectivity issues.

Method used

By collecting EEG signals during motor imagery, the completion rate and success rate of motor imagery are quantified. Combined with basic state information, adaptive parameters are dynamically generated using a preset mapping model to achieve real-time adjustment of cadence and stride length. Through a closed-loop feedback mechanism, it collaborates with rehabilitation assessment and path planning modules to construct a fully optimized rehabilitation training system.

Benefits of technology

It achieves precise matching between the control parameters of the rehabilitation robot and the patient's active movement intentions, improves the patient's rehabilitation initiative and training targeting, avoids excessive load on the limbs, and ensures the safety of training and the overall optimization of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122229658A_ABST
    Figure CN122229658A_ABST
Patent Text Reader

Abstract

This application relates to the field of medical rehabilitation equipment technology, specifically the interdisciplinary field of intelligent medical equipment and biomedical engineering. This application provides a method for adapting and controlling an upper and lower limb rehabilitation robot based on brain-computer interface fusion. The rehabilitation robot includes either an upper limb rehabilitation robot or a lower limb rehabilitation robot. The method includes: acquiring electroencephalogram (EEG) signals during a user's motor imagery; processing and analyzing the EEG signals to obtain corresponding motor imagery information; the motor imagery information includes at least one or more of motor imagery completion rate and motor imagery success rate; acquiring the user's basic state information; inputting the motor imagery information and basic state information into a preset mapping model for analysis to determine control parameters adapted to the rehabilitation robot; and controlling the rehabilitation robot according to the control parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical rehabilitation equipment technology, and in particular to an adaptation and control method for upper and lower limb rehabilitation robots based on brain-computer interface fusion. Background Technology

[0002] Current control methods for rehabilitation robots generally suffer from technical bottlenecks due to fixed gait parameters and the inability to dynamically adjust them in conjunction with the patient's real-time condition. Traditional solutions mainly rely on preset gait templates or simple motion intention recognition (such as simply determining whether the patient intends to walk) for mechanical actuation, lacking quantitative analysis of the intensity of the patient's motion intentions (e.g., unable to distinguish between the intention to "attempt to walk" and "forceful walking"). This results in core parameters such as cadence and stride length failing to accurately match the patient's active rehabilitation intentions, leading to insufficient training targeting and low patient participation. Furthermore, existing technologies often employ single-parameter control logic (such as relying solely on rehabilitation stage or limb movement data), failing to establish a dynamic adaptation model that integrates multi-dimensional data, making it difficult to consider individual patient differences (such as the degree of hemiplegia, basic human parameters, etc.). Simultaneously, traditional control methods lack closed-loop feedback mechanisms, failing to correct gait parameters in real time and coordinate with modules such as rehabilitation assessment and path planning, resulting in insufficient training safety and system disconnect issues.

[0003] Therefore, a method is urgently needed to solve at least one of the above problems. Summary of the Invention

[0004] This application provides a brain-computer interface fusion-based adaptive control method for upper and lower limb rehabilitation robots, aiming to solve the problem that existing control methods for rehabilitation robots generally have fixed gait parameters and cannot be dynamically adjusted according to the patient's real-time status.

[0005] In a first aspect, embodiments of this application provide a method for adapting and controlling an upper and lower limb rehabilitation robot based on brain-computer interface fusion, the method comprising: Collect the EEG signals of the user during motor imagery, process and analyze the EEG signals to obtain corresponding motor imagery information; the motor imagery information includes at least one or more of the following: motor imagery completion rate and motor imagery success rate. The user's basic state information is obtained, and the motor imagery information and basic state information are input into a preset mapping model for analysis to determine the control parameters that are suitable for the rehabilitation robot. The rehabilitation robot is controlled according to the control parameters.

[0006] In some embodiments, if the rehabilitation robot includes the lower limb rehabilitation robot, the control parameters include gait frequency and stride length parameters; controlling the rehabilitation robot according to the control parameters includes: controlling the rehabilitation robot to adjust its gait according to the gait frequency and stride length parameters, while simultaneously collecting the user's gait parameters in real time and transmitting them to the mapping model, and dynamically correcting the gait frequency and stride length parameters.

[0007] In some embodiments, after dynamically correcting the cadence and stride length parameters, the method further includes: acquiring correction data corresponding to the dynamic correction of the cadence and stride length parameters, generating path planning information corresponding to the rehabilitation robot, and controlling the rehabilitation robot to perform training based on the path planning information.

[0008] In some embodiments, the method further includes: acquiring adjustment data corresponding to the gait adjustment of the rehabilitation robot; and optimizing the training strategy corresponding to the rehabilitation robot using the adjustment data and the correction data.

[0009] In some embodiments, before inputting the motion imagery information and basic state information into a preset mapping model for analysis, the method further includes: generating a normal range and safety threshold for cadence and stride length; after determining the cadence and stride length parameters suitable for the lower limb rehabilitation robot, determining whether the cadence and stride length parameters are within the normal range and safety threshold, and if not, triggering a pause training command.

[0010] In some embodiments, the method further includes: if the pause training command is triggered, controlling the rehabilitation robot to pause training; when the collected motor imagery information meets the standard again, controlling the rehabilitation robot to resume training, and adjusting the cadence and stride parameters according to the new motor imagery information and basic state information.

[0011] In some embodiments, if the rehabilitation robot includes the lower limb rehabilitation robot, the control parameters include gait frequency and stride length parameters; the basic state information includes one or more of rehabilitation stage information, hemiplegia degree information, and basic human body parameters; the step of inputting the motor imagery information and the basic state information into a preset mapping model for analysis to determine the control parameters suitable for the rehabilitation robot includes: inputting the motor imagery information and the basic state information into the mapping model for analysis to determine the gait frequency and stride length parameters suitable for the lower limb rehabilitation robot.

[0012] In some embodiments, if the rehabilitation robot includes the upper limb rehabilitation robot, the control parameters include the amplitude of movement and the speed of movement; the basic state information includes one or more of the following: rehabilitation stage information, upper limb functional impairment information, and basic human parameters; the step of inputting the motor imagery information and the basic state information into a preset mapping model for analysis to determine the control parameters suitable for the rehabilitation robot includes: inputting the motor imagery information and the basic state information into the mapping model for analysis to determine the amplitude of movement and the speed of movement suitable for the upper limb rehabilitation robot.

[0013] In some embodiments, the acquisition of EEG signals during user motor imagery includes: acquiring EEG signals during user motor imagery via a pre-set prefrontal cortex brain-computer interface device.

[0014] In some embodiments, processing and analyzing the EEG signals to obtain corresponding motor imagery information includes: processing and analyzing the EEG signals according to preset motor imagery index calculation rules to obtain the motor imagery completion rate and motor imagery success rate.

[0015] This application quantifies the completion and success rate of motor imagery through brain-computer interface, breaking through the limitation of existing technology that only judges "whether there is intention" and enabling precise matching of rehabilitation robot control parameters (such as cadence and stride) with the intensity of the patient's active motor intention, thus significantly improving the patient's initiative in rehabilitation.

[0016] By integrating multi-dimensional data such as motor imagery indicators, rehabilitation stage, and degree of hemiplegia, and dynamically generating adaptive parameters through a preset mapping model, the limitations of single parameter control are overcome, and the individual differences of different patients are taken into account.

[0017] By setting safe thresholds for cadence and stride length and implementing a real-time feedback correction mechanism, excessive limb load or joint injury is avoided. Simultaneously, through data closed-loop integration with rehabilitation assessment and path planning modules, a fully optimized rehabilitation training system is formed. This approach requires no changes to the core structure of existing rehabilitation robots; functional upgrades are achieved by adding a closed-loop control module, making it easy to promote and apply in existing equipment.

[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

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

[0020] Figure 1 This is a schematic flowchart illustrating the steps of an upper and lower limb rehabilitation robot adaptation and control method based on brain-computer interface fusion, provided in one embodiment of this application. Figure 2 This is a schematic diagram of the structure of a lower limb robot provided in one embodiment of this application; Figure 3 This is a schematic diagram of the structure of an upper limb robot provided in one embodiment of this application; Figure 4 This is a schematic block diagram of the structure of an upper and lower limb rehabilitation robot adaptation control system based on brain-computer interface fusion provided in one embodiment of this application; Figure 5 This is a schematic block diagram of the structure of a computer device provided in an embodiment of this application.

[0021] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Detailed Implementation

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

[0023] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0024] It should be understood that, in order to clearly describe the technical solutions of the embodiments of the present invention, the terms "first" and "second" are used in the embodiments of the present invention to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.

[0025] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0026] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0027] Current control methods for rehabilitation robots generally suffer from technical bottlenecks due to fixed gait parameters and the inability to dynamically adjust them in conjunction with the patient's real-time condition. Traditional solutions mainly rely on preset gait templates or simple motion intention recognition (such as simply determining whether the patient intends to walk) for mechanical actuation, lacking quantitative analysis of the intensity of the patient's motion intentions (e.g., unable to distinguish between the intention to "attempt to walk" and "forceful walking"). This results in core parameters such as cadence and stride length failing to accurately match the patient's active rehabilitation intentions, leading to insufficient training targeting and low patient participation. Furthermore, existing technologies often employ single-parameter control logic (such as relying solely on rehabilitation stage or limb movement data), failing to establish a dynamic adaptation model that integrates multi-dimensional data, making it difficult to consider individual patient differences (such as the degree of hemiplegia, basic human parameters, etc.). Simultaneously, traditional control methods lack closed-loop feedback mechanisms, failing to correct gait parameters in real time and coordinate with modules such as rehabilitation assessment and path planning, resulting in insufficient training safety and system disconnect issues.

[0028] Therefore, a method is urgently needed to solve at least one of the above problems.

[0029] To solve the above problem, please refer to Figure 1 This application provides a brain-computer interface fusion-based adaptation and control method for upper and lower limb rehabilitation robots, applied to computer equipment. The computer equipment can be deployed on a single server or a server cluster. It can also be deployed on... Figure 2 or Figure 3 The rehabilitation robot shown is an example. It should also be noted that all information provided in this application was extracted with the authorization of the relevant user and in accordance with relevant regulations, and will not infringe on user privacy.

[0030] The provided method for adapting and controlling an upper and lower limb rehabilitation robot based on brain-computer interface fusion includes steps S101 to S103. Details are as follows: Step S101. Collect the EEG signal of the user during motor imagery, process and analyze the EEG signal to obtain the corresponding motor imagery information; the motor imagery information includes at least one or more of the following: motor imagery completion rate and motor imagery success rate.

[0031] Specifically, this step is the core driving force of the entire control method. Its core objective is to transform the user's invisible subjective motion intentions into quantifiable, objective numerical indicators that can be used for robot control, thus overcoming the core deficiency of existing technologies that cannot quantify the intensity of motion intentions and can only determine "whether there is intention." The motion visualization information includes at least one or more of the following: motion visualization completion rate and motion visualization success rate. The complete implementation process includes: 1. Pre-compliance and preparation phase: (1) User authorization and compliance confirmation: Strictly follow the relevant laws and regulations on personal information protection, inform users in advance of the purpose, storage method and scope of use of EEG signal collection, obtain written informed consent from users, and ensure that all data is used only for this rehabilitation training control and rehabilitation assessment, and will not be disclosed to the outside world or used for other purposes.

[0032] (2) Device selection and wearing: The non-invasive dry electrode frontal lobe brain-computer interface device is adopted, which is different from the traditional central area EEG device that requires shaving the head. It is suitable for the use scenario of stroke hemiplegic patients and improves patient compliance.

[0033] (3) User training and paradigm pre-training: Using visual and voice prompts, the standard requirements for motor imagery are clearly explained to the user: only perform subjective imagery of continuous walking on the affected lower limb, prohibit actual limb movements, and keep the whole body relaxed; Multiple pre-training sessions are conducted, with each pre-training process following the same paradigm as the formal data collection. After each pre-training session, the user receives real-time feedback on the completion rate of the motion visualization until the user can consistently complete the task (e.g., a pre-training success rate of ≥50%) before proceeding to the formal data collection stage, thus avoiding invalid data input.

[0034] (4) Baseline data acquisition: Collect 30 seconds of resting-state EEG signals from the user (the user keeps their eyes closed and relaxed, without motor imagery or limb movements) as the baseline standard for subsequent feature extraction and index calculation.

[0035] 2. Formal EEG Signal Acquisition (Paradigm and Process): A standardized event-related visual cues paradigm is adopted. A single task cycle is approximately 7 seconds. 20 consecutive cycles constitute one set, with a 1-minute rest period between sets to avoid visual and mental fatigue. The single-cycle task process strictly follows the sequence below: (1) Resting period (e.g., 0-2 seconds): A white "+" sign is displayed in the center of the screen, and a voice prompt says "Please relax". The user remains quiet and relaxed, and the system collects baseline EEG data simultaneously. (2) Prompt period (e.g., 2-3 seconds): The screen switches to a visual prompt of "Imagine walking on the affected lower limb" and plays the corresponding voice prompt simultaneously to guide the user to prepare for the movement imagery; (3) Imagination period (e.g., 3-6 seconds): The screen keeps displaying the prompts, and the user continues to imagine walking movements of the lower limbs as required. The system synchronously collects the raw EEG signals at a preset sampling frequency. This is the core effective data acquisition window. (4) Feedback period (e.g., 6-7 seconds): The screen displays the completion score of this exercise imagination, giving users real-time positive feedback, strengthening users' willingness to actively participate, and completing a single round of data collection.

[0036] If any abnormalities occur during the data acquisition process, such as electrode detachment, impedance exceeding the standard, or artifact rate greater than 30%, the system will immediately pause the acquisition, provide a voice prompt indicating the cause of the abnormality, and reacquire complete data for the current group after the abnormality is resolved to ensure the validity of the original signal.

[0037] 3. Preprocessing of EEG signals throughout the entire process: The collected raw EEG signals were subjected to stepwise noise reduction and purification to remove interference components and retain effective EEG features related to motor imagery, providing high-quality data for subsequent index calculations. The preprocessing steps and parameters are as follows: (1) Power frequency notch filter: A 50Hz second-order Butterworth notch filter is used to remove power frequency interference from the power grid; (2) Bandpass filtering: A 0.5-45Hz fourth-order Butterworth bandpass filter is used to filter out low-frequency baseline drift and high-frequency electromyography and environmental noise, while retaining the effective frequency band of the EEG signal; (3) Artifact removal: The FastICA independent component analysis algorithm is used to perform blind source separation on the filtered signal. The template matching method is used to identify artifact components of electrooculography (blinking, eye movement), electromyography (facial muscle contraction), and electrocardiogram. If the matching degree is >80%, it is determined to be an artifact and completely removed. (4) Baseline correction: The mean of the EEG signal during the resting period of the same round is used as the baseline to correct the effective signal during the imagination period, thereby eliminating individual baseline differences and the influence of slow drift. (5) Effective data segmentation: Taking the starting point of the imagination period (3 seconds) as the zero point of time, the EEG data of 0.5-3 seconds (i.e., the whole process 3.5-6 seconds) is extracted as the effective data segment for subsequent feature extraction and index calculation, avoiding the interference of EEG evoked potentials caused by the prompting period.

[0038] 4. Quantitative Calculation of Core Indicators of Motor Imagery: Through feature extraction and standardization formulas, the preprocessed EEG signals are transformed into two core quantitative indicators that can be directly used for control. The complete calculation logic may include: (1) Core feature extraction: The Welch method was used to estimate the power spectrum of the effective data segment with a window length of 256 sampling points and an overlap rate of 50%. The average power spectral density of the μ band (8-13Hz) and β band (14-30Hz) during the resting and imagination periods were calculated respectively. The μ band corresponds to the sensorimotor rhythm of the cerebral motor cortex, and the β band corresponds to the execution intensity of motor intention. The correlation between the two and lower limb motor imagination has been clinically verified.

[0039] (2) Calculation of motor imagery completion: This indicator is used to quantify the execution intensity and effort of the user's motor imagery, distinguish the difference in intent between "attempting to walk" and "walking with effort", and is the core driving parameter for cadence and stride adjustment. The calculation steps are as follows: ① Single-band ERD value calculation: The internationally accepted Event-Related Desynchronization (ERD) calculation formula is used to calculate the ERD values ​​of the μ and β bands respectively. The formula is: ERD_band=[(P_rest-P_imagine) / P_rest]×100%; where P_rest is the average power of the corresponding band during the resting period, and P_imagine is the average power of the corresponding band during the imagination period; a positive ERD value indicates a decrease in the EEG power of that band, corresponding to the activation state of motor imagination. The larger the value, the higher the degree of activation.

[0040] ② Calculation of comprehensive ERD value: Based on large clinical sample data, the ERD values ​​of the two frequency bands are weighted and summed, with a weight of 0.6 for the μ band and 0.4 for the β band (the μ band has a higher correlation with lower limb motor imagery) to obtain the comprehensive ERD value.

[0041] ③ Normalization: Set the standard comprehensive ERD value for lower limb motor imagery of healthy individuals to 30% (corresponding to a completion rate of 100%). Linearly normalize the comprehensive ERD value to the 0-100% range to obtain the final motor imagery completion rate. The formula is: Motor imagery completion rate = min(max((comprehensive ERD value / 30%)×100%,0%),100%); Example: A comprehensive ERD value of 15% corresponds to a completion rate of 50%; A comprehensive ERD value ≥ 30% is calculated as 100% completion rate; A comprehensive ERD value ≤ 0 is calculated as 0% completion rate.

[0042] (3) Calculation of success rate of motor imagery: This indicator is used to quantify the stability and continuous participation ability of users' motor imagery. It is a stability constraint parameter for cadence and stride length adjustment. The calculation steps are as follows: ① Single task validity determination: A pre-trained support vector machine (SVM) binary classifier (pre-trained classification accuracy ≥90%) is used as input, with ERD features of the μ and β frequency bands, to classify a single motion imagery task; if the classification result is "motion imagery task" and the comprehensive ERD value is ≥10%, the task is determined to be successful, otherwise it is determined to be a failure.

[0043] ② Success rate statistics: Set the sliding statistics time window to 1 minute, and count the total number of tasks and the number of successful tasks within this window. The formula is: Motion imagery success rate = (number of successful tasks / total number of tasks) × 100%; Example: If 10 motion imagery tasks are completed within 1 minute, and 7 of them are judged as successful, the success rate is 70%.

[0044] (4) Validity verification of indicators: If the completion rate of motion imagery in a single calculation is less than 10%, or the success rate within a 1-minute window is less than 30%, the system determines that the motion imagery is invalid and will not input the data into the subsequent mapping model. At the same time, the system will prompt the user to adjust the state and repeat the motion imagery to avoid invalid data causing abnormal control parameters.

[0045] Step S102. Obtain the user's basic state information, input the motion imagery information and basic state information into a preset mapping model for analysis, and determine the control parameters suitable for the rehabilitation robot.

[0046] Specifically, this step is the core decision-making stage of the entire control method. Its core objective is to overcome the limitations of existing technologies that rely on single-parameter control, and to construct a decision-making system centered on "motor intention and coordinated with multi-dimensional clinical parameters." This system outputs robot control parameters that are fully adapted to the individual user's condition, addressing the shortcomings of existing technologies in terms of personalized adaptation. For lower limb rehabilitation robots, the core control parameters are gait frequency and stride length.

[0047] Basic status information is used to constrain and control parameters within a reasonable range, aligning with the user's rehabilitation progress, physical condition, and degree of functional impairment. All information is entered into the system after assessment / measurement by the rehabilitation therapist to ensure the clinical accuracy of the data. Specific dimensions and quantitative standards are as follows: The rehabilitation stage information adopts the internationally recognized Brunnstrom hemiplegic motor function stage, divided into stages I-VI. This information is entered after assessment by a rehabilitation therapist, clearly identifying the user's lower limb function recovery stage. This is the core basis for controlling the safe range of parameters. The stages can be: Stage I-II: flaccid paralysis, no voluntary movement or only associated reactions and synkinesis; Stage III-IV: spastic stage, voluntary synkinesis and isolated movements appear, spasticity gradually subsides; Stage V-VI: recovery stage, isolated movements gradually improve, coordination ability approaches normal.

[0048] The degree of hemiplegia is assessed using the Fugl-Meyer Lower Limb Motor Function Scale (FMA-LE), with a maximum score of 34 points. The scale is entered after assessment by a rehabilitation therapist to quantify the severity of the user's lower limb dysfunction: <14 points: severe hemiplegia; 14-25 points: moderate hemiplegia; 26-34 points: mild hemiplegia.

[0049] Basic human body parameters are measured and entered by rehabilitation therapists in a standardized manner to adapt to the user's physical and physiological conditions and avoid mismatch between cadence, stride length and limb length. These parameters include: height, weight, age; length of the affected lower limb (straight-line distance from the anterior superior iliac spine to the tip of the medial malleolus, unit: cm); and baseline data of the unaffected lower limb (average cadence and average stride length when the user walks independently and steadily on the unaffected side).

[0050] The preset mapping model is a personalized adaptation model with multiple inputs and multiple outputs. Its core function is to establish a nonlinear mapping relationship between "motion imagination information + basic state information" and "step frequency and stride control parameters". It is the core algorithm carrier of this method, and the complete construction and implementation details can include: (1) Model training dataset: The dataset was constructed based on clinical rehabilitation training data of 1200 stroke hemiplegic patients. The inclusion criteria for the dataset were: meeting the diagnostic criteria for stroke, age 18-80 years, lower limb dysfunction, no severe cognitive impairment, and ability to cooperate in completing motor imagery tasks. The exclusion criteria were: comorbid severe cardiopulmonary diseases, lower limb bone and joint diseases, and history of epilepsy. The dataset was divided into training set, validation set, and test set in a ratio of 8:1:1.

[0051] (2) Model structure selection: A 3-layer BP neural network is adopted to balance fitting ability and computing speed, and to meet the low latency requirements of real-time control. The network structure parameters may include: Input layer: 8 nodes, corresponding to the input parameters [motor imagery completion rate, motor imagery success rate, Brunnstrom stage, FMA-LE score, age, length of the affected lower limb, weight, and baseline stride of the healthy side]; Hidden layer: 2 hidden layers, the first layer has 16 nodes and the second layer has 8 nodes, and the activation function is the ReLU function; Output layer: 2 nodes, corresponding to the output parameters [step frequency (unit: steps / minute), stride length (unit: cm)], and the activation function is a linear function; (3) Model training hyperparameters: The loss function is mean squared error (MSE), the optimizer is Adam algorithm, the initial learning rate is 0.001, the number of iterations is 1000, the batch size is 32, and a Dropout layer (deactivation rate 0.2) is added to prevent overfitting. After training, the goodness of fit of the model on the test set is R²≥0.92, which meets the requirements for clinical use.

[0052] (4) Multi-parameter weight allocation: The weight priority of each input parameter was determined by combining the analytic hierarchy process (AHP) with the clinical scores of 10 experts at the level of deputy director of rehabilitation department and above, to ensure that the user’s active movement intention is the core: motor imagery completion rate (35%), motor imagery success rate (25%), Brunnstrom rehabilitation stage (15%), FMA-LE hemiplegia degree (10%), human basic parameters (10%), and healthy side baseline data (5%).

[0053] (5) Online model fine-tuning mechanism: The model supports online incremental learning. After each complete training, the effective data from this training is added to the fine-tuning dataset to perform incremental fine-tuning of the model and continuously optimize the model's adaptability to individual users without retraining the full model.

[0054] The process for analyzing and outputting control parameters may include: (1) Data synchronization: The system timestamps the motion imagination information calculated in real time in step S101 with the pre-entered user basic status information and synchronously inputs the preset mapping model; (2) Model inference: The mapping model completes forward inference and outputs initial step frequency and step length parameters that are adapted to the user's current state; (3) Clinical adaptation correction: Based on the user's healthy side stride baseline data, the output stride is corrected a second time to ensure that the training stride on the affected side does not exceed 80% of the healthy side baseline stride, thus avoiding overtraining; (4) Parameter storage: The corrected step frequency and step size parameters are temporarily stored and then entered into the subsequent safety threshold verification stage. Only after the verification is passed can the parameters be sent to the robot for execution.

[0055] Step S103. Control the rehabilitation robot according to the control parameters.

[0056] Specifically, this step is the execution and closed-loop link of the entire control method. The core objective is to convert the control parameters output by the model into the actual motion of the robot, and at the same time achieve dynamic correction through real-time gait feedback, and build a complete closed-loop control system of "intent recognition - parameter decision - motion execution - feedback correction" to solve the defects of existing technologies such as open-loop control, fixed parameters and inability to adapt in real time.

[0057] The core actuators of the lower limb rehabilitation robot are the servo drive motors of the hip and knee joints. Step frequency and stride length parameters cannot directly drive the motors and must first be converted into joint control commands through a lower limb kinematic model. The stride length-joint angle conversion is based on a simplified lower limb two-bar model (the thigh and calf are rigid links), establishing the correspondence between stride length and the maximum flexion-extension angles of the hip and knee joints. The formula is: stride length ≈ 2 × L_leg × sin(θ_hip-max / 2); where L_leg is the length of the user's affected lower limb and θ_hip-max is the maximum forward flexion angle of the hip joint. Based on the stride length parameters, the target flexion-extension angle range of the hip and knee joints is solved to ensure that the stride length matches the joint movement.

[0058] Step frequency to joint velocity conversion: Step frequency corresponds to the duration of a single gait cycle, and the formula is: Gait cycle T = 60 / Step frequency (unit: seconds); Based on the gait cycle, the angular trajectory of the hip and knee joints is divided into the support phase and the swing phase, and the joint angular velocity and angular acceleration of each phase are calculated and converted into the speed and torque control commands of the servo motor.

[0059] The converted motor control commands are sent to the motion controller of the lower limb rehabilitation robot in real time via the CAN bus, with a command sending frequency of ≥100Hz to ensure the real-time performance of motion control.

[0060] After receiving control commands, the robot motion controller drives the hip and knee joint servo motors to move the user's affected lower limb to complete the stepping action according to the preset angle and speed trajectory, strictly executing the step frequency and stride parameters output by the model; The robot's onboard sensors synchronously collect real-time gait data from the user for subsequent dynamic correction. The sensor configuration and acquisition parameters are as follows: joint angle encoders are installed at the hip, knee, and ankle joints, with a sampling frequency of 200Hz and a measurement accuracy of ±0.2°, collecting real-time flexion / extension angles and angular velocities; 6-axis IMU sensors are installed on the thigh, calf, and foot, with a sampling frequency of 200Hz, collecting spatial posture and motion acceleration of the limbs; plantar pressure sensors are distributed in the heel, forefoot, and arch areas, with a sampling frequency of 100Hz, collecting plantar pressure distribution and gait events such as heel strike / toe lift, completing gait cycle segmentation. The collected real-time gait data is synchronously transmitted back to the mapping model in step S102 at a frequency of approximately 10Hz, serving as input parameters for dynamic correction and achieving closed-loop control.

[0061] The mapping model compares the actual step frequency and stride length collected in real time with the set parameters, calculates the error value between the two, and uses a fuzzy PID control algorithm to output the correction amount to dynamically adjust the step frequency and stride length parameters. The single correction amplitude is set with a limit: single correction of stride length ≤ ±2cm, single correction of step frequency ≤ ±2 steps / minute, to avoid sudden parameter changes that may cause limb discomfort or joint damage to users.

[0062] The robot motion controller is equipped with dual safety limits: one is a software limit, which restricts the maximum joint movement angle based on the safety threshold in step S102; the other is a hardware limit, which sets a mechanical limit switch at the joint movement limit position, and immediately cuts off the motor drive power when triggered to avoid joint hyperextension injury.

[0063] When abnormal situations occur, such as excessive motor torque, excessive joint angle, user triggering of emergency stop button, or persistent failure to meet the motor imagination index, the system immediately triggers the safety stop procedure: according to the preset deceleration curve, the motor speed is smoothly reduced to 0 within 0.5 seconds, the mechanical leg maintains the current safe posture, avoiding strain or fall caused by sudden stop, and at the same time, the cause of the abnormality is prompted by voice and an alarm message is sent to the rehabilitation therapist's terminal.

[0064] In some embodiments, if the rehabilitation robot includes the lower limb rehabilitation robot, the control parameters include gait frequency and stride length parameters; controlling the rehabilitation robot according to the control parameters includes: controlling the rehabilitation robot to adjust its gait according to the gait frequency and stride length parameters, while simultaneously collecting the user's gait parameters in real time and transmitting them to the mapping model, and dynamically correcting the gait frequency and stride length parameters.

[0065] This embodiment is a further refinement of step S103. The core is to clarify the complete closed-loop logic, algorithm details and execution rules of dynamic correction of stride frequency and stride, and solve the defects of existing technology where gait parameters are fixed and cannot adapt to changes in user state in real time.

[0066] The minimum correction unit is a single complete gait cycle. The gait cycle is divided by the heel strike event of the plantar pressure sensor (one gait cycle is from the current heel strike to the next heel strike). After each gait cycle is completed, a parameter correction is performed immediately to ensure the real-time nature of the correction and the integrity of the gait, and to avoid movement incoordination caused by sudden changes in parameters within the gait cycle.

[0067] Three types of core data are input simultaneously to ensure the comprehensiveness of the correction: target parameters: cadence and stride length settings output by the mapping model; actual feedback parameters: actual cadence, stride length, joint angle, and plantar pressure data collected in the current gait cycle; real-time motion visualization information: the user's average motion visualization completion rate and success rate in the current gait cycle.

[0068] Employing a fuzzy PID control algorithm, this design is adapted to the time-varying and nonlinear motion characteristics of the lower limbs in stroke patients. Compared to traditional PID algorithms, it exhibits stronger anti-interference capabilities and better adaptability. The specific design is as follows: Input: Two input dimensions: relative stride error (actual stride length - set stride length) and relative cadence error (actual cadence - set cadence); Output: Two output dimensions: stride correction and cadence correction; Fuzzy rules: Based on the experience of clinical rehabilitation experts, 25 fuzzy control rules are designed. The core logic is: when the completion rate of motor imagery is >80% and the actual stride length is lower than the set value, the stride length is increased positively; when the completion rate of motor imagery is <50% and the actual stride length is higher than the set value, the stride length is decreased negatively; the single stride length correction is ≤±2cm, the single cadence correction is ≤±2 steps / minute, and the cumulative correction over three consecutive cycles is ≤±5cm / ±5 steps / minute, avoiding significant parameter fluctuations.

[0069] The revised execution process includes: (1) After completing one gait cycle, collect the actual gait parameters and calculate the error between the actual gait parameters and the set values; (2) Input the error and real-time motion imagination information into the fuzzy PID correction algorithm, and output the corrected step frequency and stride parameters; (3) Perform a safety threshold check on the corrected parameters. Once the check passes, convert them into joint control commands. (4) Execute the corrected control parameters in the next gait cycle, collect new feedback data, and enter the next correction cycle to realize real-time dynamic closed-loop correction throughout the training process.

[0070] In some embodiments, after dynamically correcting the cadence and stride length parameters, the method further includes: acquiring correction data corresponding to the dynamic correction of the cadence and stride length parameters, generating path planning information corresponding to the rehabilitation robot, and controlling the rehabilitation robot to perform training based on the path planning information.

[0071] This embodiment is a full-link extension of the core method. The core is to connect the dynamic correction data of stride frequency and stride length with the robot's autonomous walking path planning module, so as to solve the defects of existing technology where gait control and path planning are disconnected and cannot adapt to changes in the user's walking ability. The specific implementation method is as follows: 1. Feature extraction of corrected data: Set 5 minutes as an analysis window, extract the core features of the corrected data within the window for path planning adaptation decisions. Specific features include: average stride correction amount, correction trend (continuous positive increase / negative decrease / stable); stride frequency stability (stride frequency coefficient of variation, the smaller the coefficient of variation, the better the stability); average level and trend of motion imagery index; correction trigger frequency (number of corrections per unit time).

[0072] The path planning module dynamically adjusts the walking path from four dimensions based on corrected data features to adapt to the user's current walking ability.

[0073] The dual closed-loop execution process of path planning and gait control includes: (1) After each analysis window is completed, extract the corrected data features and input them into the path planning model; (2) The path planning model generates a path map that is adapted to the user's current walking ability based on the mapping rules, including path length, turning points, obstacle locations, and road slope; (3) Send the path map to the robot's navigation module and synchronize the path features to the step frequency and stride mapping model to adapt to path changes in advance (such as reducing step frequency and shortening stride before turning). (4) The robot performs training according to the planned path. During the training process, the robot performs real-time dynamic correction of step frequency and stride, collects path tracking error, and adjusts gait parameters in sync. (5) After completing the current path training, extract the corrected data features again, optimize the next round of path planning, and form a dual closed-loop collaborative system of "gait correction-path planning-gait adaptation".

[0074] In some embodiments, the method further includes: acquiring adjustment data corresponding to the gait adjustment of the rehabilitation robot; and optimizing the training strategy corresponding to the rehabilitation robot using the adjustment data and the correction data.

[0075] This embodiment is a long-term optimization and extension of the core method. The core is to use the adjustment data of cadence and stride length to continuously optimize the user's personalized training strategy and mapping model, so as to solve the defects of existing technology that the training strategy is fixed and cannot continuously adapt to the user's rehabilitation progress.

[0076] After each training session, the system performs standardized, timestamped storage of all training data for subsequent strategy optimization. The stored data dimensions include: user basic information, rehabilitation assessment results before the training session; time-series data of motor imagery indicators, initial adjustment data of stride frequency and stride length for each session; correction data, error data, and real-time gait feedback data for each gait cycle; abnormal events during training, pause / recovery records, and user subjective fatigue scores.

[0077] For example, the training strategy optimization process is automatically triggered if any of the following conditions are met: the user completes 3 or more full training sessions; the user's Brunnstrom stage and FMA-LE score change after the rehabilitation therapist reassesses; the user's average success rate of motor imagery increases by more than 20% in 3 consecutive training sessions; and the stride correction is consistently positive and cumulatively increases by more than 10cm in 3 consecutive training sessions.

[0078] The feature importance analysis employs a random forest algorithm to analyze stored historical data, identify core features affecting user training performance, and rank them to determine personalized weights for each input parameter, replacing general weights. Training rule optimization, based on the analysis results, generates personalized training rules, including: initial stride frequency and stride range settings, single-set training duration, rest intervals between sets, progressive training difficulty, and personalized adjustments to safety thresholds. The optimized rules and historical effective data are used as an incremental training set to fine-tune the mapping model online, updating the model's network weights and improving the model's adaptation accuracy to individual users. Cross-validation is used to compare model prediction errors, user motion visualization success rates, and gait parameter stability before and after optimization to verify the optimization effect. If there is no improvement after optimization, the system automatically rolls back to the previous version's training strategy and model parameters.

[0079] After optimization, the new training rules and model parameters are updated to the system and take effect in the next training session. At the same time, a personalized rehabilitation training plan is generated and submitted to the rehabilitation therapist for review. The therapist can make manual adjustments based on clinical experience to ensure the safety and effectiveness of the training strategy.

[0080] In some embodiments, before inputting the motion imagery information and basic state information into a preset mapping model for analysis, the method further includes: generating a normal range and safety threshold for cadence and stride length; after determining the cadence and stride length parameters suitable for the lower limb rehabilitation robot, determining whether the cadence and stride length parameters are within the normal range and safety threshold, and if not, triggering a pause training command.

[0081] This embodiment optimizes the safety of the core method. The core is to clarify the clinical basis and grading standards for the normal range of cadence and stride length and the safety threshold, and to establish an abnormal triggering and pausing control mechanism to solve the defects of existing technology in terms of insufficient safety and easy to cause joint damage to patients.

[0082] The threshold setting and grading standards are based on relevant industry standards and follow the Brunnstrom rehabilitation stages, dividing gait frequency and stride length into three levels: the normal range (recommended usage interval), the warning threshold (risk warning interval), and the safety hard threshold (forced pause interval). Regardless of the stage, the output stride length parameters must not exceed 80% of the user's healthy side stride length baseline, and the gait frequency parameters must not exceed 90% of the healthy side gait frequency baseline to avoid overtraining. After the mapping model outputs the gait frequency and stride length parameters, it immediately enters the threshold verification module, performing graded verification according to the following process: (1) Level 1 verification: Determine whether the parameters are within the normal range. If they are, send them directly to the robot for execution. (2) Secondary verification: If the parameter exceeds the normal range but does not exceed the warning threshold, a voice warning "The current parameter exceeds the recommended range, please pay attention to safety" is triggered, and the motion imagery index is verified for the second time; if the motion imagery completion rate is >80% and the success rate is >70%, execution is allowed; otherwise, it is automatically adjusted to the upper limit of the normal range before execution. (3) Three-level verification: If the parameter exceeds the safety hard threshold, regardless of whether the motor imagery index meets the standard, the training pause instruction is triggered immediately, and the abnormal event is recorded and an alarm message is generated and sent to the rehabilitation therapist terminal.

[0083] Upon triggering the pause command, the robot's motion controller immediately executes a smooth stop procedure: following an S-shaped deceleration curve, the servo motor speed is smoothly reduced to 0 within 0.5 seconds to avoid joint strains or patient falls caused by sudden stops; after the motor stops, the robotic leg maintains its current safe posture and is not forcibly reset to a neutral position to avoid spasms caused by passive limb movement; the system simultaneously informs the user of the pause reason via voice, such as "stride length exceeds the safe threshold, training has been paused," while the screen displays the pause details for the user and rehabilitation therapist to view.

[0084] In some embodiments, the method further includes: if the pause training command is triggered, controlling the rehabilitation robot to pause training; when the collected motor imagery information meets the standard again, controlling the rehabilitation robot to resume training, and adjusting the cadence and stride parameters according to the new motor imagery information and basic state information.

[0085] This embodiment is a supplement and optimization to the above embodiment. The core is to clarify the user status monitoring rules after training is paused, the criteria for resuming training, and the smooth recovery process, so as to solve the defects of the existing technology that cannot intelligently resume training after pausing and easily cause secondary stress to users.

[0086] After triggering a training pause, the robot maintains a safe posture, and the system simultaneously initiates multi-dimensional continuous monitoring without requiring additional user intervention. The monitoring content and rules are as follows: The brain-computer interface device continuously collects the user's EEG signals at the original sampling frequency, calculates the completion rate and success rate of motor imagery every 3 seconds, and tracks the user's motor intention status in real time; if paired with wearable physiological sensors, the system simultaneously monitors the user's heart rate and blood oxygen saturation. If the heart rate is >120 beats / min or blood oxygen saturation is <94%, the pause state is continuously locked, and the recovery process is not triggered; the system simultaneously monitors electrode impedance, motor status, and sensor data. If any device malfunction is detected, the pause state is continuously locked until the malfunction is resolved.

[0087] For example, all of the following conditions must be met simultaneously to determine that the status is up to standard and trigger the recovery process to avoid safety risks caused by accidental recovery: (1) The completion rate of motor imagery is ≥70% for three consecutive calculations; (2) The success rate of motor imagery is ≥60% within one minute; (3) Physiological indicators such as heart rate and blood oxygen saturation are within the normal range and there are no abnormalities; (4) The electrodes, motors, sensors and other equipment are in normal condition and there are no faults; (5) The rehabilitation therapist has not set a lockout command to prohibit recovery.

[0088] Once the target status is met, the system first prompts the user via voice and screen: "Your exercise status has met the target, training is about to resume, please prepare." A 3-second preparation time is allowed to avoid sudden start-up causing user anxiety. After the preparation time, the system does not directly restore the parameters before the pause. Instead, it uses 80% of the cadence and stride length parameters before the pause as the starting parameters to start the robot and complete two full gait cycles, allowing the user to gradually adapt. After two adaptation cycles, the system recalculates the appropriate cadence and stride length parameters using a mapping model based on real-time collected motion visualization and basic status information. After threshold verification, the parameters are issued for execution. After resuming normal training, real-time dynamic correction of cadence and stride length is simultaneously initiated, returning to the closed-loop control process of the core method.

[0089] If the system triggers the pause training command more than 3 times within 10 minutes, it will automatically determine that the user's condition is not suitable for continuing training, immediately terminate the training, and prompt the user with a voice message: "Your condition is not suitable for continuing training. Please rest and try again later." At the same time, a complete report of this training will be generated, including the reason for the pause, changes in motor imagery indicators, and gait parameter data, and sent to the rehabilitation therapist for evaluation and adjustment of the subsequent training plan.

[0090] In some embodiments, if the rehabilitation robot includes the lower limb rehabilitation robot, the control parameters include gait frequency and stride length parameters; the basic state information includes one or more of rehabilitation stage information, hemiplegia degree information, and basic human body parameters; the step of inputting the motor imagery information and the basic state information into a preset mapping model for analysis to determine the control parameters suitable for the rehabilitation robot includes: inputting the motor imagery information and the basic state information into the mapping model for analysis to determine the gait frequency and stride length parameters suitable for the lower limb rehabilitation robot.

[0091] This embodiment is a further refinement of step S102. The core is to clarify the weight allocation, adaptation logic and personalized control rules of multi-parameter collaboration, so as to solve the defects of the existing technology of single parameter control and inability to take into account individual differences of users.

[0092] By clearly defining the quantitative standards for core input parameters, it is ensured that all parameters can be converted into numerical quantities that can be input into the model, without any vague qualitative descriptions. The Analytic Hierarchy Process (AHP) is used in conjunction with clinical expert scoring to determine the weight allocation of each parameter. The core principle is to take the user's active movement intention as the core driver, the rehabilitation stage as the safety boundary, and individual physiological parameters as the adaptation basis. Specific weights may include: First priority (core driver): motor imagery completion rate 35%, motor imagery success rate 25%, totaling 60%, to ensure that the adjustment of cadence and stride length always follows the user's active movement intention and improves active participation; Second priority (safety constraint): Brunnstrom rehabilitation stage 15%, FMA-LE hemiplegia degree 10%, totaling 25%, to ensure that the parameters are always within the safe range of the user's rehabilitation stage and avoid overtraining; Third priority (individual adaptation): basic human body parameters 10%, healthy side baseline data 5%, totaling 15%, to ensure that the parameters are adapted to the user's physical and physiological conditions and conform to the healthy side walking habits.

[0093] For users at different rehabilitation stages and with varying degrees of hemiplegia, the model automatically adjusts parameter adaptation logic to achieve personalized control. The core rules are as follows: For users with severe hemiplegia and Brunnstrom Stage I-II: The model prioritizes safety, with weights tilted towards the rehabilitation stage and degree of hemiplegia. Step frequency and stride length are strictly controlled within the normal range, providing higher tolerance for fluctuations in motor imagery indicators. Parameter adjustments are smoother to avoid triggering limb spasticity. For users with moderate hemiplegia and Brunnstrom Stage III-IV: The model balances safety and training effectiveness, maintaining a core weight for motor imagery information. The range of step frequency and stride length is moderately widened, and parameter adjustment sensitivity is moderate. Real-time gait feedback is used for correction to guide users in completing isolated movements. For users with mild hemiplegia and Brunnstrom Stage V-VI: The model prioritizes the challenge and active participation in training. The weight of motor imagery information is further increased, and the range of step frequency and stride length is close to the baseline data of the healthy side. The model is more sensitive to motor imagery indicators, encouraging users to actively control their gait and gradually regain independent walking ability.

[0094] The execution process of multi-parameter collaboration is as follows: (1) The system synchronously collects 6 types of core parameters and completes the standardization quantization and timestamp alignment; (2) According to the weight allocation rules, the quantified parameters are input into the mapping model; (3) The model combines the personalized adaptation rules to complete the multi-dimensional feature fusion and output the adapted step frequency and stride parameters; (4) After the safety threshold verification, it is sent to the robot for execution, and real-time gait feedback data is collected at the same time to enter the next round of multi-parameter collaborative analysis to achieve continuous dynamic adaptation.

[0095] In some embodiments, if the rehabilitation robot includes the upper limb rehabilitation robot, the control parameters include the amplitude of movement and the speed of movement; the basic state information includes one or more of the following: rehabilitation stage information, upper limb functional impairment information, and basic human parameters; the step of inputting the motor imagery information and the basic state information into a preset mapping model for analysis to determine the control parameters suitable for the rehabilitation robot includes: inputting the motor imagery information and the basic state information into the mapping model for analysis to determine the amplitude of movement and the speed of movement suitable for the upper limb rehabilitation robot.

[0096] This embodiment is a cross-scenario extension of the core method. The core is to fully adapt the control logic of the lower limb rehabilitation robot to the upper limb rehabilitation robot, thereby solving the defects of existing upper limb rehabilitation robots, such as fixed parameters, low active participation, and insufficient personalization.

[0097] This embodiment is adapted to an integrated shoulder-elbow-wrist upper limb rehabilitation robot, targeting patients with upper limb dysfunction after stroke. The core control parameters have been adjusted from the lower limb's gait frequency and stride to the shoulder joint's range of motion, elbow joint's speed of motion, and wrist joint's range of motion, as follows: Shoulder joint control parameters: range of motion for flexion / abduction, range 0-120°; Elbow joint control parameters: speed of motion for flexion and extension, range 5-25° / second; Wrist joint control parameters: range of motion for dorsiflexion / palmar flexion, range 0-45°.

[0098] The lower limb walking motor imagery paradigm was adjusted to the upper limb motor imagery paradigm, specifically "imagine the affected upper limb raising its hand to touch the opposite shoulder" and "imagine the affected upper limb clenching its fist and then slowly extending it." The single-round task sequence remained unchanged (2 seconds of resting period + 1 second of prompting period + 3 seconds of imagery period + 1 second of feedback period). The prefrontal cortex EEG signals were still collected, and ERD features of the μ and β bands were extracted. The motor imagery completion rate and motor imagery success rate were calculated using the same formula as for the lower limbs. Only the training dataset of the pre-trained SVM classifier was adjusted to upper limb motor imagery data to ensure that the classification accuracy was ≥90%.

[0099] The basic status information adjustment includes the upper limb rehabilitation stage (Brunnstrom staging), the degree of upper limb dysfunction (Fugl-Meyer Upper Limb Motor Function Score FMA-UE, full score 66 points, <28 points is severe, 28-45 points is moderate, and 46-66 points is mild), basic human parameters (upper limb length, shoulder width, age, weight), and baseline data of the healthy upper limb movement; based on the clinical data of upper limb rehabilitation, a BP neural network model specifically for upper limbs was retrained. The input layer nodes correspond to the relevant upper limb parameters, and the output layer has 3 nodes, corresponding to the shoulder joint range of motion, the elbow joint speed of motion, and the wrist joint range of motion, respectively. The model's goodness of fit on the test set is R²≥0.90, meeting the requirements for clinical use; according to the Brunnstrom staging of the upper limb, the normal range, warning threshold, and safety hard threshold of each control parameter were set. For example, the hard threshold for shoulder joint forward flexion range is 120°, and the hard threshold for elbow joint speed of motion is 30° / second, to avoid injury caused by hyperextension or excessively rapid movement.

[0100] The closed-loop control process of the upper limb rehabilitation robot includes: (1) collecting the EEG signal of the user's upper limb motor imagination, processing and analyzing it to obtain the completion rate and success rate of motor imagination; (2) acquiring the user's basic upper limb status information, synchronously inputting it into the upper limb-specific mapping model, and outputting the appropriate joint movement amplitude and speed control parameters; (3) after safety threshold verification, converting the control parameters into control instructions for the servo motors of the upper limb robot's shoulder joint, elbow joint, and wrist joint, driving the robotic arm to perform the corresponding movements; (4) collecting the actual upper limb movement parameters in real time through the robot's joint encoder and force sensor, transmitting them back to the mapping model, dynamically correcting the control parameters, and realizing closed-loop control; (5) triggering a pause command when there is an abnormality, intelligently recovering after the status reaches the standard, and simultaneously feeding the adjustment data back to the rehabilitation assessment module to optimize the training strategy and fully reproduce the closed-loop control logic of the core method.

[0101] In some embodiments, the acquisition of EEG signals during user motor imagery includes: acquiring EEG signals during user motor imagery via a pre-set prefrontal cortex brain-computer interface device.

[0102] This embodiment is a further refinement of the EEG signal acquisition step in step S101. The core is to clarify the equipment specifications, acquisition process, and quality control standards of the prefrontal cortex brain-computer interface, and to solve the shortcomings of traditional central EEG devices, such as complex wearing, low patient compliance, and difficulty in clinical implementation.

[0103] Key advantages and specifications of the prefrontal cortex brain-computer interface device: Unlike traditional EEG devices that need to be placed in the C3 and C4 central regions, the prefrontal cortex electrodes are worn on the forehead area, requiring no shaving or removal of scalp oil. The wearing and operation are simple, with high patient acceptance, especially suitable for stroke patients with cognitive impairment and low cooperation. It can also stably collect EEG characteristics related to motor imagery, meeting control needs. The electrode type is a non-invasive dry electrode, made of gold / silver-plated silver chloride, requiring no conductive gel. During the data collection process, if the user's forehead skin has a lot of oil or sweat, gently wipe the forehead electrode wearing area with a 75% alcohol swab, and wear the device after the alcohol has evaporated; no shaving is required. Place the device on the user's forehead, ensuring that the FP1 and FP2 electrodes are in close contact with the forehead skin, the Fz electrode is located on the midline of the forehead, and the Cz electrode is located in the center of the top of the head. Adjust the tightness of the headband to ensure a secure fit without significant pressure. After wearing, the system automatically performs full-channel electrode impedance detection. A single-channel impedance <5kΩ is considered acceptable. If the impedance of a certain channel exceeds the standard, the user is prompted to adjust the position of that electrode or clean the skin again until all channel impedances meet the standard. After the impedance meets the standard, the system collects the user's 30-second resting-state EEG signal with eyes closed. The user remains completely relaxed, without limb movement or motor imagery. The system uses this data as a baseline for subsequent ERD value calculation.

[0104] The data collection process takes place in a quiet, softly lit rehabilitation training room, avoiding direct sunlight, strong electromagnetic interference, and frequent movement of people to reduce environmental artifacts. Users maintain a seated posture with back support and full-body relaxation, avoiding frequent blinking, clenching teeth, facial muscle contractions, and other movements to reduce electromyography (EMG) and electrooculography (EOG) artifacts. During the data collection process, the system monitors the quality of EEG signals in real time. If the percentage of artifacts exceeds 30% for three consecutive task cycles, the data collection is immediately paused, and the user is prompted to remain relaxed and reduce limb movements. Data collection resumes once the signal quality recovers. Each set consists of 20 consecutive rounds of data collection, with a one-minute rest between sets. If the user's success rate in motor imagery drops by more than 20% for two consecutive sets, the user is prompted to extend the rest time to avoid invalid data due to mental fatigue.

[0105] If an electrode in a certain channel falls off during the data acquisition process, the system will immediately pause the acquisition and prompt the user to put the electrode back on. After completing the impedance detection again, the acquisition will continue. If Bluetooth connection drops or signal loss occurs, the system will immediately pause the robot's movement and trigger the safety stop procedure. Training can only resume after the signal is restored and recalibrated. If the artifact rate of 5 consecutive data sets is greater than 30%, the system will terminate the acquisition and prompt the therapist to check the equipment, assess the user's cooperation, and change the acquisition time or adjust the paradigm.

[0106] In some embodiments, processing and analyzing the EEG signals to obtain corresponding motor imagery information includes: processing and analyzing the EEG signals according to preset motor imagery index calculation rules to obtain the motor imagery completion rate and motor imagery success rate.

[0107] This embodiment is a further refinement of the indicator calculation step in step S101. The core is to clarify the complete calculation process, algorithm parameters, and validity judgment criteria for the two core indicators, so as to ensure the standardization, reproducibility, and high reliability of indicator calculation, and solve the defects of the existing technology in that the quantification of motion intention is unclear and there is no unified standard.

[0108] By clearly defining the steps and parameters that must be strictly followed in the preprocessing of EEG signals before index calculation, the consistency of input data must be ensured and the index calculation error caused by preprocessing differences must be avoided: (1) Resampling: The original EEG signal is uniformly resampled to 250Hz to reduce the amount of computation and improve the calculation speed; (2) Power frequency notch: 50Hz second-order Butterworth notch filter, zero-phase filtering, to avoid signal phase shift; (3) Bandpass filtering: 0.5-45Hz fourth-order Butterworth bandpass filter, zero-phase filtering, to retain the effective frequency band; (4) Artifact removal: FastICA algorithm, maximum number of iterations 1000 times, convergence threshold 1e-6, to remove artifacts of electrooculography, electromyography and electrocardiography; (5) Baseline correction: The signal mean of the resting period (0-2 seconds) of the same round is used as the baseline to correct the signal of the imagination period; (6) Data segmentation: The data of 0.5-3 seconds of the imagination period (i.e. 3.5-6 seconds after the start of the task) is extracted as the effective data segment for subsequent feature extraction.

[0109] Welch's method was used to estimate the power spectrum of the effective data segment and the resting period data. Fixed parameters were: window length of 256 sampling points, frame shift of 128 sampling points (overlap rate 50%), FFT number of 512, and Hanning window. The average power spectral density of each data segment was calculated in the μ band (8-13Hz) and β band (14-30Hz). For the μ and β bands, the ERD value was calculated using the standardized formula: ERD_μ / β=[(P_rest(μ / β)-P_imagine(μ / β)) / P_rest(μ / β)]×100%; where P_rest(μ / β) is the average power of the corresponding frequency band during the resting period, and P_imagine(μ / β) is the average power of the corresponding frequency band during the imaginary period. The ERD values ​​of the two frequency bands are weighted and summed, with fixed weights of 0.6 for the μ band and 0.4 for the β band. The formula is: Overall ERD value = ERD_μ × 0.6 + ERD_β × 0.4. Based on large-sample clinical data, the standard overall ERD value for healthy individuals is fixed at 30% (corresponding to 100% completion). The overall ERD value is linearly normalized to the 0-100% range. The formula is: Overall ERD value ≤ 0, motor imagery completion = 0%; 0 < Overall ERD value < 30%, motor imagery completion = (Overall ERD value / 30%) × 100%; Overall ERD value ≥ 30%, motor imagery completion = 100%. For continuously calculated completion data, a moving average filter is used for smoothing. The moving window is 3 task cycles to avoid control parameter jumps caused by single data fluctuations.

[0110] The training dataset for SVM classifier pre-training and optimization was constructed by collecting lower limb motor imagery EEG data from 50 healthy individuals and 200 stroke patients, extracting μ and β band ERD features, and labeling them as "motor imagery" and "resting state." A radial basis function (RBF) kernel was used, and the penalty coefficient C and kernel parameter γ were optimized using a grid search method to ensure a 5-fold cross-validation accuracy ≥90%. Classifier calibration was performed on a per-user basis during pre-training to improve classification accuracy for individual users. For a single motor imagery task, both of the following conditions must be met simultaneously for the task to be considered successful: Condition 1: The SVM classifier classifies the features for this task as "motor imagery"; Condition 2: The calculated comprehensive ERD value for this task is ≥10%. Failure to meet either condition results in task failure.

[0111] A 1-minute sliding time window is used, with a window step size of 1 task cycle, to achieve real-time updates of the success rate; the success rate of motor imagery is calculated as (number of successful tasks within the statistical window / total number of tasks within the statistical window) × 100%; when the total number of tasks within the statistical window is less than 5, the success rate is not updated to avoid statistical errors caused by insufficient sample size.

[0112] If any of the following conditions are met, the indicator is deemed invalid and no mapping model is input: ① Motion visualization completion rate < 10%; ② Success rate within a 1-minute window < 30%; ③ The completion rate fluctuation exceeds 50% for 3 consecutive cycles. When the indicator is invalid, the system keeps the current step frequency and stride parameters unchanged and does not perform any adjustments. At the same time, the system will prompt the user with a voice prompt "Please maintain stable motion visualization" to guide the user to adjust their state until the indicator becomes valid again, and then perform parameter adjustments.

[0113] Please see Figure 4 As shown, Figure 4This is a schematic diagram of the structure of a brain-computer interface fusion-based upper and lower limb rehabilitation robot adaptation control system 200 provided in this application embodiment. This brain-computer interface fusion-based upper and lower limb rehabilitation robot adaptation control system 200 is used to execute the steps of the brain-computer interface fusion-based upper and lower limb rehabilitation robot adaptation control method shown in the above embodiments. The brain-computer interface fusion-based upper and lower limb rehabilitation robot adaptation control system 200 can be a single server or a server cluster, or it can be a terminal, such as a handheld terminal, a laptop computer, a wearable device, or a robot.

[0114] like Figure 4 As shown, the brain-computer interface fusion-based upper and lower limb rehabilitation robot adaptation and control system 200 includes: The signal acquisition unit 201 is used to acquire the electroencephalogram (EEG) signals of the user during motor imagery, process and analyze the EEG signals, and obtain corresponding motor imagery information; the motor imagery information includes at least one or more of the motor imagery completion rate and the motor imagery success rate. The information acquisition unit 202 is used to acquire the user's basic state information, input the motion imagination information and basic state information into a preset mapping model for analysis, and determine the control parameters that are suitable for the rehabilitation robot. The control completion unit 203 is used to control the rehabilitation robot according to the control parameters.

[0115] In some embodiments, if the rehabilitation robot includes the lower limb rehabilitation robot, the control parameters include gait frequency and stride length parameters; controlling the rehabilitation robot according to the control parameters includes: controlling the rehabilitation robot to adjust its gait according to the gait frequency and stride length parameters, while simultaneously collecting the user's gait parameters in real time and transmitting them to the mapping model, and dynamically correcting the gait frequency and stride length parameters.

[0116] In some embodiments, after dynamically correcting the cadence and stride length parameters, the method further includes: acquiring correction data corresponding to the dynamic correction of the cadence and stride length parameters, generating path planning information corresponding to the rehabilitation robot, and controlling the rehabilitation robot to perform training based on the path planning information.

[0117] In some embodiments, the method further includes: acquiring adjustment data corresponding to the gait adjustment of the rehabilitation robot; and optimizing the training strategy corresponding to the rehabilitation robot using the adjustment data and the correction data.

[0118] In some embodiments, before inputting the motion imagery information and basic state information into a preset mapping model for analysis, the method further includes: generating a normal range and safety threshold for cadence and stride length; after determining the cadence and stride length parameters suitable for the lower limb rehabilitation robot, determining whether the cadence and stride length parameters are within the normal range and safety threshold, and if not, triggering a pause training command.

[0119] In some embodiments, the method further includes: if the pause training command is triggered, controlling the rehabilitation robot to pause training; when the collected motor imagery information meets the standard again, controlling the rehabilitation robot to resume training, and adjusting the cadence and stride parameters according to the new motor imagery information and basic state information.

[0120] In some embodiments, if the rehabilitation robot includes the lower limb rehabilitation robot, the control parameters include gait frequency and stride length parameters; the basic state information includes one or more of rehabilitation stage information, hemiplegia degree information, and basic human body parameters; the step of inputting the motor imagery information and the basic state information into a preset mapping model for analysis to determine the control parameters suitable for the rehabilitation robot includes: inputting the motor imagery information and the basic state information into the mapping model for analysis to determine the gait frequency and stride length parameters suitable for the lower limb rehabilitation robot.

[0121] In some embodiments, if the rehabilitation robot includes the upper limb rehabilitation robot, the control parameters include the amplitude of movement and the speed of movement; the basic state information includes one or more of the following: rehabilitation stage information, upper limb functional impairment information, and basic human parameters; the step of inputting the motor imagery information and the basic state information into a preset mapping model for analysis to determine the control parameters suitable for the rehabilitation robot includes: inputting the motor imagery information and the basic state information into the mapping model for analysis to determine the amplitude of movement and the speed of movement suitable for the upper limb rehabilitation robot.

[0122] In some embodiments, the acquisition of EEG signals during user motor imagery includes: acquiring EEG signals during user motor imagery via a pre-set prefrontal cortex brain-computer interface device.

[0123] In some embodiments, processing and analyzing the EEG signals to obtain corresponding motor imagery information includes: processing and analyzing the EEG signals according to preset motor imagery index calculation rules to obtain the motor imagery completion rate and motor imagery success rate.

[0124] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the upper and lower limb rehabilitation robot adaptation control system and its modules described above can be found in the corresponding contents of the various embodiments of the upper and lower limb rehabilitation robot adaptation control method based on brain-computer interface fusion, and will not be repeated here.

[0125] The aforementioned brain-computer interface fusion-based upper and lower limb rehabilitation robot adaptation and control method can be implemented as a computer program, which can be used in, for example... Figure 4 It runs on the device shown.

[0126] Please see Figure 5 , Figure 5 This is a schematic block diagram of the structure of a computer device provided in an embodiment of this application. The computer device includes a processor, a memory, and a network interface connected via a device bus, wherein the memory may include a storage medium and internal memory.

[0127] The storage medium can store operating devices and computer programs. The computer program includes program instructions that, when executed, cause the processor to perform any brain-computer interface-based upper and lower limb rehabilitation robot adaptation control method.

[0128] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0129] The internal memory provides an environment for the execution of computer programs in non-volatile storage media. When the computer program is executed by the processor, it enables the processor to execute any brain-computer interface fusion-based upper and lower limb rehabilitation robot adaptation control method.

[0130] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the terminal to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0131] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.

[0132] In one embodiment, the processor is configured to run a computer program stored in memory to perform the following steps: Collect the EEG signals of the user during motor imagery, process and analyze the EEG signals to obtain corresponding motor imagery information; the motor imagery information includes at least one or more of the following: motor imagery completion rate and motor imagery success rate. The user's basic state information is obtained, and the motor imagery information and basic state information are input into a preset mapping model for analysis to determine the control parameters that are suitable for the rehabilitation robot. The rehabilitation robot is controlled according to the control parameters.

[0133] In some embodiments, if the rehabilitation robot includes the lower limb rehabilitation robot, the control parameters include gait frequency and stride length parameters; controlling the rehabilitation robot according to the control parameters includes: controlling the rehabilitation robot to adjust its gait according to the gait frequency and stride length parameters, while simultaneously collecting the user's gait parameters in real time and transmitting them to the mapping model, and dynamically correcting the gait frequency and stride length parameters.

[0134] In some embodiments, after dynamically correcting the cadence and stride length parameters, the method further includes: acquiring correction data corresponding to the dynamic correction of the cadence and stride length parameters, generating path planning information corresponding to the rehabilitation robot, and controlling the rehabilitation robot to perform training based on the path planning information.

[0135] In some embodiments, the method further includes: acquiring adjustment data corresponding to the gait adjustment of the rehabilitation robot; and optimizing the training strategy corresponding to the rehabilitation robot using the adjustment data and the correction data.

[0136] In some embodiments, before inputting the motion imagery information and basic state information into a preset mapping model for analysis, the method further includes: generating a normal range and safety threshold for cadence and stride length; after determining the cadence and stride length parameters suitable for the lower limb rehabilitation robot, determining whether the cadence and stride length parameters are within the normal range and safety threshold, and if not, triggering a pause training command.

[0137] In some embodiments, the method further includes: if the pause training command is triggered, controlling the rehabilitation robot to pause training; when the collected motor imagery information meets the standard again, controlling the rehabilitation robot to resume training, and adjusting the cadence and stride parameters according to the new motor imagery information and basic state information.

[0138] In some embodiments, if the rehabilitation robot includes the lower limb rehabilitation robot, the control parameters include gait frequency and stride length parameters; the basic state information includes one or more of rehabilitation stage information, hemiplegia degree information, and basic human body parameters; the step of inputting the motor imagery information and the basic state information into a preset mapping model for analysis to determine the control parameters suitable for the rehabilitation robot includes: inputting the motor imagery information and the basic state information into the mapping model for analysis to determine the gait frequency and stride length parameters suitable for the lower limb rehabilitation robot.

[0139] In some embodiments, if the rehabilitation robot includes the upper limb rehabilitation robot, the control parameters include the amplitude of movement and the speed of movement; the basic state information includes one or more of the following: rehabilitation stage information, upper limb functional impairment information, and basic human parameters; the step of inputting the motor imagery information and the basic state information into a preset mapping model for analysis to determine the control parameters suitable for the rehabilitation robot includes: inputting the motor imagery information and the basic state information into the mapping model for analysis to determine the amplitude of movement and the speed of movement suitable for the upper limb rehabilitation robot.

[0140] In some embodiments, the acquisition of EEG signals during user motor imagery includes: acquiring EEG signals during user motor imagery via a pre-set prefrontal cortex brain-computer interface device.

[0141] In some embodiments, processing and analyzing the EEG signals to obtain corresponding motor imagery information includes: processing and analyzing the EEG signals according to preset motor imagery index calculation rules to obtain the motor imagery completion rate and motor imagery success rate.

[0142] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the steps of the brain-computer interface fusion-based upper and lower limb rehabilitation robot adaptation control method provided in any embodiment of this application.

[0143] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, SmartMediaCard (SMC), SecureDigital (SD) card, or FlashCard equipped on the computer device.

[0144] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for adapting and controlling an upper and lower limb rehabilitation robot based on brain-computer interface fusion, characterized in that, The rehabilitation robot includes either an upper limb rehabilitation robot or a lower limb rehabilitation robot; the method includes: Collect the EEG signals of the user during motor imagery, process and analyze the EEG signals to obtain corresponding motor imagery information; the motor imagery information includes at least one or more of the following: motor imagery completion rate and motor imagery success rate. The user's basic state information is obtained, and the motor imagery information and basic state information are input into a preset mapping model for analysis to determine the control parameters that are suitable for the rehabilitation robot. The rehabilitation robot is controlled according to the control parameters.

2. The method according to claim 1, characterized in that, If the rehabilitation robot includes the lower limb rehabilitation robot, the control parameters include gait frequency and stride length parameters; the step of controlling the rehabilitation robot according to the control parameters includes: The rehabilitation robot adjusts its gait according to the gait frequency and stride length parameters, while simultaneously collecting the user's gait parameters in real time and transmitting them to the mapping model to dynamically correct the gait frequency and stride length parameters.

3. The method according to claim 2, characterized in that, After dynamically correcting the step frequency and step size parameters, the method further includes: The cadence and stride length parameters are acquired and dynamically corrected to generate corresponding correction data, thereby generating path planning information for the rehabilitation robot. The rehabilitation robot is then trained based on the path planning information.

4. The method according to claim 3, characterized in that, The method further includes: Obtain the adjustment data corresponding to the gait adjustment of the rehabilitation robot; The adjusted data and the corrected data are used to optimize the training strategy corresponding to the rehabilitation robot.

5. The method according to claim 2, characterized in that, Before inputting the motion visualization information and basic state information into a preset mapping model for analysis, the process also includes: Generate the normal range and safety threshold for cadence and stride length; After determining the gait frequency and stride length parameters suitable for the lower limb rehabilitation robot, it is determined whether the gait frequency and stride length parameters are within the normal range and safety threshold. If not, a pause training command is triggered.

6. The method according to claim 5, characterized in that, The method further includes: If the pause training command is triggered, the rehabilitation robot will pause training. When the collected motor imagery information meets the standard, the rehabilitation robot is controlled to resume training, and the cadence and stride parameters are adjusted according to the new motor imagery information and basic state information.

7. The method according to claim 1, characterized in that, If the rehabilitation robot includes the lower limb rehabilitation robot, the control parameters include gait frequency and stride length parameters; the basic state information includes one or more of the following: rehabilitation stage information, hemiplegia degree information, and basic human body parameters; the step of inputting the motor imagery information and basic state information into a preset mapping model for analysis to determine control parameters suitable for the rehabilitation robot includes: The motion visualization information and the basic state information are input into the mapping model for analysis to determine the gait frequency and stride parameters suitable for the lower limb rehabilitation robot.

8. The method according to claim 1, characterized in that, If the rehabilitation robot includes the upper limb rehabilitation robot, the control parameters include amplitude of movement and speed of movement; the basic state information includes one or more of the following: rehabilitation stage information, upper limb functional impairment degree information, and basic human parameters; the step of inputting the motor imagery information and basic state information into a preset mapping model for analysis to determine the control parameters suitable for the rehabilitation robot includes: The motion imagery information and the basic state information are input into the mapping model for analysis to determine the motion amplitude and speed suitable for the upper limb rehabilitation robot.

9. The method according to claim 1, characterized in that, The collection of EEG signals during user motor imagery includes: The brainwave signals of the user during motor imagery are collected through a pre-set prefrontal cortex brain-computer interface device.

10. The method according to claim 9, characterized in that, The process of processing and analyzing the electroencephalogram (EEG) signals to obtain corresponding motor imagery information includes: The EEG signals are processed and analyzed according to the preset motor imagery index calculation rules to obtain the motor imagery completion rate and motor imagery success rate.