A neural rehabilitation closed-loop regulation method and system based on electroencephalogram-electromyogram-functional electrical stimulation cooperation

By employing a closed-loop control method that coordinates EEG, EMG, and functional electrical stimulation, the system can identify patients' intention to move in real time and adjust electrical stimulation parameters based on muscle responses. This solves the problems of insufficient or excessive electrical stimulation in existing technologies, thereby improving the precision and safety of neurorehabilitation training.

CN123167401APending Publication Date: 2026-11-27HUAZHONG UNIV OF SCI & TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611269600.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-20
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing functional electrical stimulation devices lack real-time individualized adjustment, making it difficult to simultaneously reflect the patient's active movement intention and the actual response state of the target muscles. This leads to problems such as insufficient stimulation, excessive stimulation, muscle fatigue, and abnormal activation. In particular, for patients with moderate to severe motor dysfunction, existing protocols result in insufficient contraction of the target muscle groups and unstable stimulation responses.

Method used

A closed-loop control method synergistically employing EEG, EMG, and functional electrical stimulation is adopted. By recognizing the patient's intention to move through EEG and combining it with EMG feedback from the target muscle group, the functional electrical stimulation parameters are dynamically adjusted, forming a closed-loop control process among EEG, EMG, and functional electrical stimulation, thereby achieving real-time adjustment of electrical stimulation.

Benefits of technology

It improves the precision and effectiveness of neurorehabilitation training, directly regulates the activation state of target muscles, identifies insufficient, excessive, fatigued, and abnormal contractions of stimulation, and dynamically adjusts stimulation parameters, thereby improving treatment efficiency and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123167401A_ABST
    Figure CN123167401A_ABST
Patent Text Reader

Abstract

The application discloses a kind of neural rehabilitation closed-loop regulation and control method and system based on electroencephalogram-electromyogram-functional electrical stimulation cooperation, including the electroencephalogram signal of patient in attempt movement or motor imagination stage is collected, electroencephalogram signal is handled, and extract band energy, time domain statistical feature and spatial distribution feature;Characteristics are input motion intention classification model, and output motion intention category and its confidence, first stability is judged, further judge its confidence, and generate corresponding stimulation target information;According to motion intention, select target muscle group and initial stimulation parameter, stimulate and collect target muscle group and the electromyogram of relevant muscle group, and extract electromyogram amplitude, root mean square, integral electromyogram, activation timing and fatigue feature;Judge current stimulation effect;According to evaluation result, update the functional electrical stimulation parameter of next cycle, so that subsequent stimulation output gradually approaches the desired muscle response range.Form closed-loop regulation and control process between electroencephalogram, electromyogram and functional electrical stimulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of brain-computer interface, electromyography feedback, functional electrical stimulation and neurorehabilitation equipment, specifically to a closed-loop regulation method and system for neurorehabilitation based on the synergy of EEG, EMG and functional electrical stimulation. Background Technology

[0002] Stroke, traumatic brain injury, spinal cord injury, and other neurological disorders often lead to varying degrees of motor dysfunction. Moderate to severe cases often present with weak voluntary motor function, difficulty activating muscles, impaired neural pathways, and disuse atrophy of muscles. Functional electrical stimulation (FESPS) is a common neurorehabilitation technique. It induces contraction of target muscles through electrical stimulation, helping patients complete motor training, slowing muscle atrophy, and promoting the recovery of neuromuscular pathways.

[0003] Traditional functional electrical stimulation (fEP) devices typically require physicians or therapists to set the stimulation intensity, frequency, pulse width, and duration based on experience, or to trigger stimulation based on a single peripheral feedback signal. The stimulation process lacks real-time individualized adjustment. While these methods can induce muscle contraction or neuromodulation, they struggle to simultaneously reflect the patient's active motor intention and the actual response state of the target muscle. For patients with moderate to severe motor dysfunction, issues such as weak active motor intention, difficulty activating target muscles, rapid muscle fatigue, and large differences in stimulation thresholds are common. If the system outputs electrical stimulation solely based on preset parameters, problems such as insufficient stimulation, excessive stimulation, muscle fatigue, abnormal activation of antagonistic muscles, or low treatment efficiency can easily occur.

[0004] Brain-computer interface (BCI) technology identifies a patient's motor intentions by collecting electroencephalogram (EEG) signals, allowing rehabilitation equipment to intervene when the patient makes an active movement intention. Electromyographic (EMG) feedback technology can reflect whether the target muscle is activated, whether the activation intensity is appropriate, and whether fatigue or abnormal co-contraction occurs. Therefore, combining EEG, EMG, and functional electrical stimulation helps to form a closed loop of neurorehabilitation: "active intention - muscle activation - feedback regulation".

[0005] Patent CN121944383A discloses a closed-loop bilateral vagus nerve stimulation system integration and method for neurological rehabilitation. The system includes a host computer, a bilateral stimulation module, a rehabilitation training execution module, and an electromyography (EMG) acquisition module. The system selects a rehabilitation training mode based on the patient's neurological function assessment results, guides the patient to perform target training movements, and acquires EMG signals from the target muscle groups on the healthy side. The existing technology has the following main drawbacks: First, existing stimulation protocols primarily utilize electromyographic signals to modulate central nervous system stimulation rather than directly regulating target muscles or peripheral motor pathways. Therefore, these protocols have limited direct regulatory capacity for issues such as insufficient actual contraction of the target muscle group and unstable stimulus-induced muscle responses.

[0006] Second, existing approaches primarily use electromyography (EMG) from the healthy or functionally preserved side as a reliable feedback source. This approach is suitable for triggering motor events and synchronizing central regulation, but for patients requiring reconstruction of the activation capacity of the target muscles on the affected side, further evaluation of the actual EMG response of the affected side or target muscle group after electrical stimulation is still necessary.

[0007] Third, the existing scheme lacks a three-modal synergistic regulatory mechanism among brainwave active motor intention, target muscle electromyographic response, and functional electrical stimulation parameters. Summary of the Invention

[0008] To address the aforementioned technical problems, the present invention aims to provide a closed-loop control method for neurorehabilitation based on the synergy of EEG, EMG, and functional electrical stimulation. This method forms a closed-loop control process among EEG, EMG, and functional electrical stimulation. Based on EEG recognition of the patient's active movement intention, and combined with EMG feedback from the target muscle group, the functional electrical stimulation parameters are dynamically adjusted. This allows the electrical stimulation to be driven by the patient's active intention and to be adjusted in real-time according to the actual muscle response, thereby improving the accuracy, safety, and effectiveness of neurorehabilitation training.

[0009] Another objective of this invention is to provide a closed-loop control system for neurorehabilitation based on the synergy of EEG-EMG-functional electrical stimulation. This system forms a real-time closed loop by integrating EEG motor intention, EMG response of the target muscle group, and adjustment of functional electrical stimulation parameters. This makes electrical stimulation no longer a fixed output, nor is it solely triggered by peripheral EMG events. Instead, it involves the patient's active intention and is dynamically adjusted based on the actual response of the target muscle, achieving a synergistic rehabilitation process of "patient wants to move - stimulation assists muscle movement - muscle feedback regulates stimulation".

[0010] To further achieve the above objectives, the present invention adopts the following technical solution: a closed-loop modulation method for neurorehabilitation based on the synergy of electroencephalography (EEG), electromyography (EMG), and functional electrical stimulation (FESPS), comprising the following steps: S1. Collect EEG signals from patients during the attempt to move or motor imagery phase, filter, suppress artifacts, and window the EEG signals, and extract frequency band energy, temporal statistical features, and spatial distribution features. S2. Input the above features into the motion intention classification model, output the motion intention category and its confidence level, and then perform a stability judgment. When the intention is stable, further judge whether its confidence level is higher than a preset threshold. If the confidence level is higher than the preset threshold, the intention is judged as a valid motion intention and the corresponding stimulus target information is generated. S3. Select the target muscle group and initial stimulation parameters according to the movement intention. After stimulation, collect the electromyographic signals of the target muscle group and related muscle groups. Filter, rectify, smooth and window the electromyographic signals and extract the electromyographic amplitude, root mean square value, integral electromyographic, activation sequence and fatigue characteristics. The electromyographic signal of the target muscle group is used to determine whether the stimulation produces effective activation. The electromyographic signal of related muscle groups or antagonistic muscles is used to determine whether abnormal co-contraction occurs. S4. Based on the features extracted in step S3, determine the current stimulation effect and evaluate the muscle response classification after stimulation according to the preset evaluation priority order. The muscle response classification includes abnormal enhancement of antagonistic muscle, fatigue trend, insufficient response, appropriate response, and excessive response. S5. Based on the evaluation results of step S4, perform the adjustment step of the stimulation parameters corresponding to the first hit response category with the highest priority, and update the functional electrical stimulation parameters for the next cycle. Perform safety checks on the updated stimulation parameters in sequence, including checks on the patient's individual upper limit, device output range, electrode impedance, single pulse charge density, and current readback deviation. Output the functional electrical stimulation pulse for the next stimulation cycle only when all checks pass; otherwise, stop the output of the corresponding stimulation channel and trigger an alarm. Continuously cycle through steps S1 to S5 to keep the stimulation output close to the desired muscle response range within the safety boundaries.

[0011] Optionally, in step S2, the motion intent classification model adopts any one of four algorithms: random forest, support vector machine, linear discriminant analysis, or lightweight neural network. After each algorithm discriminates the input feature vector, it outputs the probability value of each motion intent category, selects the category with the highest probability as the current candidate motion intent, and uses the probability value corresponding to the category as the confidence level of the current intent.

[0012] Optionally, in step S2, the stability judgment rule includes: assuming the candidate intent category sequence output in the most recent 5 time windows is... The non-resting category that appears most frequently is denoted as The number of times it appears is recorded as Ignoring the resting category, count the occurrences of each of the remaining categories and find the non-resting category with the highest frequency. and the number of times it appears ;like ,and If the intention is stable, it is determined that the intention is stable; otherwise, it is determined to be unstable, the system continues to collect data, and no electrical stimulation is triggered. The confidence level judgment rule includes: assuming the intent is stable, further checking the average confidence level of the intent within the stable window. Confidence level of the latest window If both conditions are met, the movement intention is deemed valid. The invalid motor intention is determined by any of the following conditions: the non-resting intention appears less than 3 times in 5 windows; the average confidence level is less than 0.72; the confidence level of the latest window is less than 0.68; more than 2 different non-resting intentions appear in the most recent 5 windows and none of them are dominant; invalid intentions do not trigger any electrical stimulation output.

[0013] Optionally, in step S3, determining the initial stimulation parameters includes: starting with a low intensity of 5 mA for each target channel, gradually increasing the stimulation intensity in 2 mA increments, with a fixed frequency of 30 Hz, a fixed pulse width of 200 μs, and each stimulation level lasting 1 s; and acquiring the sensory threshold current intensity. Motion threshold current intensity and maximum comfort stimulation current intensity The initial stimulus intensity is set to The initial pulse width is set to 200-300 μs, and the initial frequency is set to 30-35 Hz.

[0014] Optionally, in step S3, the criteria for determining valid activation are: According to the method of M-wave detection: the peak amplitude of electromyography in the target muscle group channel is detected within a time period of 5-25 ms after the end of the blanking window. If the peak amplitude exceeds the mean of the resting baseline plus 3 times the standard deviation, the M-wave is determined to be present. Based on the second principle of sustained activation of the electromyographic envelope: For the effective data segment within the 200 ms evaluation window, the normalized mean electromyographic envelope value of the target muscle group channel is calculated. ,like If it is determined to be a valid activation; If it is determined to be weak activation, it is classified as insufficient response; Furthermore, no M-wave was detected, indicating no activation and classifying it as insufficient response.

[0015] Optionally, in step S4, the classification of muscle responses after stimulation is evaluated according to a preset evaluation priority order, including: using a rule-based threshold method for determination, with the determination performed in the following priority order: Criterion 1: Abnormal enhancement of antagonist muscle: RMS antag RMS target × 0.60, and the relative timing of antagonist muscle activation is <30ms, RMS antag The root mean square value of the antagonistic muscle group, RMS target This represents the root mean square value of the antagonistic muscle group; Judgment 2: Fatigue trend: Furthermore, the median frequency over the three most recent consecutive assessment windows is below 85% of the baseline; This represents the ratio of the median frequency of the electromyographic signal of the target muscle group in the current 200 ms window to the median frequency of the resting baseline data 30 s before the start of training. Criterion 3: Overly strong response: The mean normalized envelope of the target muscle group > 0.8, or the range of motion of the joints observed online exceeds the upper limit of the target range set by the therapist by 120%; Criterion 4: Insufficient response: The mean normalized envelope of the target muscle group is <0.15, and activation is delayed. >20 ms, or the target muscle group envelope never exceeds the resting baseline + 3 standard deviations within 200 ms after stimulus output; Judgment 5: Appropriate response: The mean normalized envelope of the target muscle group is between 0.15 and 0.80. The activation delay is within the normal range.

[0016] Optionally, step S5 performs the adjustment step size of the stimulation parameters corresponding to the first hit response category with the highest priority, and updates the functional electrical stimulation parameters for the next cycle, including: When the antagonist muscle is abnormally enhanced, the current is reduced by 3 mA and the pulse width is shortened by 25 μs. If the stimulation current intensity and pulse width have reached the lower limit, the lower limit stimulation parameters are maintained and no further reduction is made. If the abnormality persists for two consecutive cycles, the next alternative channel pre-registered by the therapist is switched to, and the initial stimulation parameters or the most recent safe stimulation parameters corresponding to the channel are used to continue stimulation. If the antagonist muscle is abnormally enhanced in all alternative stimulation channels, the stimulation output corresponding to the current target action is stopped, the abnormal status is recorded, and the therapist is prompted to check. When fatigue tends to occur, reduce the frequency by 5 Hz, extend the rest interval by 2 s, and shorten the duration of a single stimulus by 0.5 s. If the stimulation frequency and duration have reached the lower limit and the rest interval has reached the upper limit, keep the boundary parameters unchanged. If fatigue tends to occur after 3 consecutive stimulation cycles, pause the stimulation for 60 s. After the pause, continue training with the reduced stimulation parameters, or wait for the next effective movement intention to be confirmed before resuming stimulation. If the response is too strong, the current will be reduced by 2 mA and the duration of a single stimulus will be shortened by 0.5 s. If the current intensity, stimulation duration and pulse width have all reached the lower limit, and the response is still judged to be too strong in the next stimulation cycle, the stimulation pulse width will be further shortened by 50 μs on the basis of the above adjustments. If the response is insufficient, first increase the stimulation current by 2 mA. After reaching the smaller of the patient's maximum comfortable stimulation current intensity and the upper limit of the individual current, increase the pulse width by 50 μs. If the response is still insufficient even after both the stimulation current intensity and the pulse width have reached their upper limits, record the abnormality and prompt the therapist to check the electrode position. When the response is appropriate, all stimulus parameters should remain constant. The stimulation current intensity, pulse width, frequency, duration, and rest interval are all limited to 5 mA - I. lim Within the ranges of 50-500 μs, 15-50 Hz, 1-8 s, and 4-20 s, I lim Maximum comfort stimulation current intensity for patients Upper limit of individual current during operation And the minimum value in the upper limit of the device current.

[0017] A closed-loop modulation system for neurorehabilitation based on the synergy of EEG, EMG, and functional electrical stimulation, employing the aforementioned closed-loop modulation method for neurorehabilitation based on the synergy of EEG, EMG, and functional electrical stimulation, includes: The EEG acquisition module is used to acquire EEG signals from the patient's scalp, perform signal conditioning, and transmit the signals to the main control computing module. The EEG motor intention recognition module communicates with the EEG acquisition module and the main control computing module. It is used to preprocess the raw EEG, extract features and classify the recognition, output the motor intention category and its confidence level, and pass it to the main control computing module for decision-making. The electromyography (EMG) acquisition module communicates with the muscle response assessment module to acquire surface EMG signals of the target muscle group and related muscle groups, perform signal conditioning, and transmit the signals to the main control computing module. The muscle response assessment module communicates with the stimulation parameter adjustment module and is used to assess the activation level, activation sequence, fatigue state, and abnormal co-contraction of antagonistic muscles of the target muscle group based on the electromyographic data output by the electromyographic acquisition module, and output the current muscle response classification result. The functional electrical stimulation module is connected to the main control computing module and is used to generate controllable electrical stimulation pulses according to the stimulation parameter instructions issued by the main control computing module and apply them to the target muscle group through patch electrodes. The stimulation parameter adjustment module is connected in communication with the functional electrical stimulation module. It is used to receive muscle response assessment results, calculate updated stimulation parameters according to the closed-loop adjustment strategy, and write them into the parameter register area of ​​the main control calculation module for use in the next stimulation cycle. The main control computing module is the central hub of the system. It is responsible for receiving EEG and EMG data, running all algorithms, managing stimulation parameters and sending control commands to the electrical stimulation module, and coordinating the timing synchronization of each module. The safety protection module communicates with the functional electrical stimulation module to prevent electrical stimulation from causing harm to the patient at both the hardware and software levels.

[0018] The key point of this invention lies in constructing a real-time closed loop by integrating brainwave motor intention, target muscle group electromyographic response, and functional electrical stimulation parameter adjustment. This transforms electrical stimulation from a fixed output, triggered solely by peripheral electromyographic events, into a process actively driven by the patient's intention and dynamically adjusted based on the actual response of the target muscles. This invention provides a closed-loop system structure that coordinates three modalities: brainwave, electromyography, and functional electrical stimulation. It generates target muscle groups and initial stimulation parameters based on brainwave motor intention; it directly modulates functional electrical stimulation onto target muscles or peripheral neuromuscular pathways; it assesses muscle response after stimulation based on target muscle group electromyographic feedback; it identifies abnormal co-contraction based on antagonistic or related muscle group electromyography; it dynamically adjusts stimulation intensity, frequency, pulse width, stimulation channel, and stimulation sequence based on electromyographic response; it adjusts stimulation frequency, duration, and rest interval based on electromyographic fatigue characteristics; it includes graded adjustment of stimulation parameters and a safety protection mechanism; and it achieves a closed-loop neurorehabilitation regulation combining brainwave intention triggering and electromyographic response feedback adjustment. By forming a real-time closed loop by integrating brainwave motor intention, target muscle group electromyographic response, and functional electrical stimulation parameter adjustment, electrical stimulation is no longer a fixed output, nor is it merely triggered by peripheral electromyographic events. Instead, it involves the patient's active intention and is dynamically adjusted based on the actual response of the target muscles, achieving a collaborative rehabilitation process of "patient wants to move - stimulation assists muscle movement - muscle feedback regulates stimulation".

[0019] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the aforementioned neurorehabilitation closed-loop modulation method based on EEG-EMG-functional electrical stimulation synergy.

[0020] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the aforementioned closed-loop modulation method for neurorehabilitation based on EEG-EMG-functional electrical stimulation synergy.

[0021] Compared with the prior art, the present invention has the following advantages: First, the stimulation target of the present invention is the target muscle group or peripheral neuromuscular pathway, which can directly regulate the activation state of the target muscle.

[0022] Second, this invention introduces EEG motor intention as an active control input, so that electrical stimulation is not only triggered by peripheral electromyographic events, but can also be associated with the patient's active motor intention.

[0023] Third, this invention uses electromyographic feedback of the target muscle group to determine the actual muscle response after electrical stimulation, and can identify situations such as insufficient stimulation, excessive stimulation, fatigue, and abnormal co-contraction.

[0024] Fourth, the present invention can dynamically adjust the intensity, pulse width, frequency, stimulation channel and stimulation sequence of the stimulation current according to the electromyographic response, rather than triggering stimulation only according to the action event. Attached Figure Description

[0025] Figure 1 This is a diagram showing the overall structure of the system of the present invention; Figure 2 This is a flowchart of the functional electrical stimulation triggered by EEG motor intent according to the present invention; Figure 3 This invention provides a stimulation parameter adjustment process based on electromyographic response. Figure 4 This is a flowchart of the closed-loop regulation process of the present invention; Figure 5 This is a schematic diagram of the hardware system composition of the present invention. Detailed Implementation

[0026] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0027] Example 1:

[0028] A closed-loop regulatory system for neurorehabilitation based on the synergy of EEG, EMG, and functional electrical stimulation, such as Figure 1 As shown, it mainly includes an EEG acquisition module, an EEG motor intention recognition module, an EMG acquisition module, a muscle response assessment module, a functional electrical stimulation module, a stimulation parameter adjustment module, a main control calculation module, and a safety protection module. The functions and implementation methods of each module are as follows: The EEG acquisition module is used to acquire EEG signals from the patient's scalp, perform signal conditioning, and transmit the signals to the main control computing module. This embodiment uses a 16-channel dry electrode EEG cap, with electrodes arranged according to the international 10-20 system extension standard at positions corresponding to the motor and sensorimotor cortices: FC3, FC4, C3, Cz, C4, CP3, CPz, and CP4. Each channel includes a low-noise instrumentation amplifier, an on-chip bandpass filter, and a 24-bit Sigma-Delta analog-to-digital converter. The low-noise instrumentation amplifier has an input impedance ≥200 MΩ, a common-mode rejection ratio ≥110 dB, and an input reference noise ≤1 μV. rms The on-chip bandpass filter is 0.1-100Hz, and the sampling frequency is set to 1000Hz. Data from each channel is packaged by the onboard microcontroller and transmitted to the main control module via Bluetooth Low Energy (BLE5.0) or a wired SPI interface. The reference electrode uses a bilateral mastoid average reference, and the ground electrode is placed at the AFz position on the forehead.

[0029] The EEG motor intention recognition module communicates with the EEG acquisition module and the main control computing module. It is used to preprocess, extract features, and classify the raw EEG data, outputting the motor intention category and its confidence level, which is then transmitted to the main control computing module for decision-making. The EEG motor intention recognition module runs as a software algorithm within the main control computing module. Preprocessing includes 50 Hz notch filtering, 0.1-45 Hz bandpass filtering, and artifact suppression; feature extraction includes frequency band energy, temporal statistics, and ERD / ERS features; the classifier uses a random forest model (the default scheme in this embodiment).

[0030] The electromyography (EMG) acquisition module, communicatively connected to the muscle response assessment module, is used to acquire surface EMG signals from the target muscle group and related muscle groups (including antagonistic muscles), perform signal conditioning, and transmit the signals to the main control computing module and the muscle response assessment module. This embodiment employs an 8-channel wireless surface EMG acquisition system. Each channel consists of a pair of Ag / AgCl patch differential electrodes and a closely mounted miniature front-end module. The electrode spacing between the differential electrodes is [missing information]. The front-end module includes a differential instrumentation amplifier (1000x gain, common-mode rejection ratio ≥100 dB), hardware bandpass filtering (20-500 Hz), and analog-to-digital conversion (16-bit, sampling frequency 1000 Hz). Data from each channel is transmitted to the main control computing module via a wireless module (BLE or dedicated 2.4 GHz protocol). Furthermore, a blanking window is set within each stimulation cycle. When the functional electrical stimulation module outputs a stimulation pulse, an analog switch shuts off the amplifier input of the corresponding electromyography (EMG) front-end to prevent stimulation artifacts from saturating the front-end amplifier. The duration of the blanking window is set to the stimulation pulse width plus... After the blanking window ends, the electromyography (EMG) front end resumes normal acquisition.

[0031] The muscle response assessment module, communicating with the stimulation parameter adjustment module, evaluates the activation level, activation sequence, fatigue state, and abnormal co-contraction of antagonist muscles in the target muscle group based on the electromyography (EMG) data output from the EMG acquisition module. It outputs the current muscle response classification result (insufficient response / appropriate / excessive / abnormal antagonist muscle / fatigue trend). The muscle response assessment module runs as a software algorithm on the main control computing module. After filtering, full-wave rectification, low-pass smoothing, and windowing of the EMG signal, it extracts the EMG amplitude, activation onset time, duration, fatigue-related spectral features, and co-activation features of the antagonist and target muscles in the target muscle group. Based on the extraction results, the muscle response assessment module classifies the muscle response after the current stimulation into: insufficient response, appropriate response, excessive response, abnormal enhancement of antagonist muscles, and fatigue trend, and sends the classification result to the stimulation parameter adjustment module.

[0032] The functional electrical stimulation module, communicating with the main control computing module, generates controllable electrical stimulation pulses based on stimulation parameter commands issued by the main control computing module, and applies them to the target muscle group through patch electrodes. This embodiment employs a 4-channel independent constant current functional electrical stimulator. Each channel consists of a programmable constant current source, an H-bridge output stage, and an output isolation transformer. It can output bi-phase symmetrical square wave pulses, with a stimulation current intensity range of 0-80 mA (0.5 mA steps), a pulse width range of 50-500 μs (10 μs steps), a frequency range of 1-100 Hz (1 Hz steps), and a stimulation duration of 0.1-30 s. Stimulation parameters are sent in real-time by the main control computing module via SPI or UART interface. Each channel output is equipped with a current-limiting resistor and a current readback circuit to detect whether the actual output current matches the command.

[0033] The stimulation parameter adjustment module, communicatively connected to the functional electrical stimulation module, receives muscle response assessment results, calculates updated stimulation parameters (current intensity, pulse width, frequency, channel, and duration) according to a closed-loop adjustment strategy, and writes them into the parameter register area of ​​the main control calculation module for use in the next stimulation cycle. Implementation: It runs as a software algorithm on the main control calculation module. It employs adaptive strategies such as rule-based thresholding (the default scheme in this embodiment) or fuzzy control.

[0034] The main control computing module, serving as the system's central hub, is responsible for receiving EEG and EMG data, running all algorithms (intention recognition, muscle response assessment, and stimulation parameter adjustment), managing stimulation parameters, issuing control commands to the electrical stimulation module, and coordinating the timing synchronization of each module. Hardware implementation: It employs an ARM Cortex-M7 or Cortex-A series embedded processor with a clock speed of at least 400MHz, running a real-time operating system (FreeRTOS or RT-Linux). The main control cycle is set to 1 ms (for stimulation pulse timing control), and the algorithm evaluation cycle is set to 200 ms (consistent with the EMG / EEG feature extraction window cycle). The main control processing unit communicates with the EEG front-end, EMG front-end, and stimulation output circuit via SPI / UART, and with the host computer via Bluetooth or WiFi.

[0035] The safety protection module, communicating with the functional electrical stimulation module, is used to prevent harm to the patient from electrical stimulation at both hardware and software levels. Hardware level: Each stimulation channel output is equipped with a hardware current-limiting circuit (maximum output current not exceeding 80 mA); the output impedance detection circuit measures the electrode-skin impedance before each stimulation; if the impedance is below 200 Ω (short circuit risk) or above 5 kΩ (electrode detachment), the channel output is disabled; the emergency stop button directly cuts off the power supply to the stimulation output stage. Software level: The main control calculation module checks the following conditions during each stimulation cycle: the deviation between the stimulation current readback value and the command value does not exceed 10%, and the charge density of a single channel stimulation does not exceed the safety threshold (in this embodiment, based on an electrode area of ​​4 cm²). 2 Based on this, the single-pulse charge ≤ pulse width × current ≤ 500 μs × 80 mA = 40 μC, and the charge density ≤ 10 μC / cm³. 2 The electromyography (EMG) acquisition module should return data normally after the blanking window ends. If any condition is not met, the stimulation output should be immediately paused and an alarm should be issued.

[0036] Example 2:

[0037] A closed-loop modulation method for neurorehabilitation based on the synergy of EEG, EMG, and functional electrical stimulation includes the following steps: Step 1: The EEG acquisition module collects the EEG signals generated by the patient when attempting movement or imagining movement. The EEG motor intention recognition module filters, suppresses artifacts, and windowes the EEG signals, and extracts frequency band energy, temporal statistical features, and spatial distribution features.

[0038] The EEG signal acquisition method and equipment are as follows: EEG signals are acquired using the 16-channel dry electrode EEG cap described in Example 1 (electrode positions include: FC3, FC4, C3, Cz, C4, CP3, CPz, and CP4, which are scalp EEG electrode positions named according to the international 10-20 / 10-10 system, mainly distributed in the band-shaped area from the frontal-central to the central-parietal lobe, close to the sensorimotor cortex, and commonly used for studies of attempted movement / motor imagery, where F represents the frontal region, C represents the central region, FC represents the frontocentral region, CP represents the central-parietal region, and z represents the midline of the head; odd numbers are usually on the left side, and even numbers are usually on the right side). After the patient wears the EEG cap, data from all channels are continuously acquired without the patient needing to manually switch between "attempted movement" or "motor imagery" modes.

[0039] "Attempted movement" refers to a patient actually attempting to exert force to perform a movement, but due to nerve damage, the muscles may be unable to complete it or can only complete it partially; "motor imagery" refers to a patient imagining themselves performing a movement without actual muscle contraction. Both attempted movement and motor imagery can cause event-related desynchronization in the μ and β bands of the contralateral sensorimotor cortex. Therefore, it is not mandatory to distinguish between the two, but rather to recognize and process them uniformly as motor intentions. For attempted movement, the electromyography (EMG) acquisition module can usually detect weak but identifiable EMG activity; for motor imagery, EMG activity is usually close to the resting baseline. EMG information can be used as auxiliary information in subsequent motor intention determination. Event-related desynchronization (ERD) is used to characterize the degree of decrease in the power of μ and β band neural rhythms in the contralateral sensorimotor cortex. ,in, The baseline power is the average band power of the resting EEG segment in the most recent 10 seconds before the start of the motor task. This represents the power of the frequency band within the current 1-second time window. When the ERD exponent is less than 0, it indicates that the current frequency band power is lower than the resting baseline power, meaning that the neural rhythm in that frequency band has desynchronized. The larger the absolute value of the ERD exponent, the more pronounced the neural activity related to motor intention. In this embodiment, ERD features are calculated on the μ and β bands of the C3, Cz, C4, CP3, CPz, and CP4 channels, and combined with other temporal statistical features and spatial distribution features to form EEG feature data for subsequent motor intention recognition.

[0040] Filtering, artifact suppression, and windowing of EEG signals include: (1) Power frequency notch filtering: Apply notch filters to the 50 Hz and 100 Hz harmonics with a bandwidth of ±2 Hz and a notch depth of ≥40dB. The notch filters are used to significantly attenuate the amplitude of the target interference frequency (50 Hz±2 Hz, 100 Hz±2 Hz) according to the notch depth, while preserving other frequency bands as much as possible, thereby reducing the impact of 50 Hz power frequency interference and 100 Hz harmonic interference on subsequent EEG feature extraction and motion intention recognition; Notch filter sampling frequency Taking 1000 Hz, at two center frequencies of 50 Hz and 100 Hz. The acquired EEG signals were sequentially processed using a second-order IIR notch filter; the output of the 50 Hz notch filter stage was used as the input of the 100 Hz notch filter stage, with a bandwidth B of 4 Hz for each stage. First, calculations were performed... and Then, the transfer function of the filter is obtained by the following formula.

[0041] ; This indicates that the signal is delayed by one sampling point. This indicates a delay of two sampling points.

[0042] (2) Bandpass filtering: 4th order bandpass filter with a passband of 0.1-45 Hz. Causal filtering is used in the online stage, introducing a group delay of about 10ms, which does not affect real-time performance.

[0043] (3) Artifact Suppression: An adaptive regression method based on recursive least squares (RLS) is used to suppress EEG artifacts. The low-frequency components (<4 Hz) in the FCz channel are highly correlated with EEG. First, the FCz channel signal is bandpass filtered from 0.1 to 4 Hz to obtain a low-frequency reference signal. Then, an EEG reference vector is constructed using this low-frequency reference signal, and its regression coefficients propagating to each EEG channel to be corrected are estimated online. The estimated EEG components are then subtracted from the original EEG signals of each channel in real time. The regression-based EEG artifact removal method is a classic technique established in the field of EEG signal processing. This method has low computational cost and is suitable for real-time operation.

[0044] (4) Windowing: The sliding window length is 1.0 s and the step size is 0.2 s. Each window generates a set of multi-channel EEG matrices.

[0045] Feature extraction of EEG signals includes: extracting the following three types of features for each valid sliding window: (1) Frequency band energy characteristics: The eight channels are bandpass filtered in five frequency bands: θ (4-8 Hz), μ (8-13 Hz), low β (13-20 Hz), high β (20-30 Hz) and low γ (30-45 Hz). The variance of the signal within the window is then taken as the logarithm to the base 10 to obtain the logarithmic power of each channel in each frequency band, resulting in 8×5=40-dimensional basic characteristics. The logarithmic power difference between channels C3 and C4 in the four frequency bands of θ, μ, low β and high β is calculated to obtain the 4-dimensional logarithmic power difference characteristics of the left and right hemispheres: log(C3, θ)- log(C4, θ), log(C3, μ)- log(C4, μ), log(C3, low β)- log(C4, low β), log(C3, high β)- log(C4, high β), totaling 44 dimensions.

[0046] (2) Temporal statistical features: The MRCP negative peak amplitude and negative peak latency (time offset from the start of the window) of each channel were extracted in the 0.1-3 Hz frequency band. The above two features were extracted for each of the eight EEG channels to obtain a 16-dimensional temporal statistical feature vector.

[0047] MRCP stands for Motor-Related Cortical Potentials. For the first... Each channel first performs a 0.1–3 Hz bandpass filter on the EEG signal to obtain the MRCP-related low-frequency components. In the current length of 1 second, containing Within a time window of each sampling point, determine the sampling point number corresponding to the minimum potential. MRCP negative peak amplitude The negative of the minimum potential value within this window: The unit is MRCP negative peak latency period The time offset of the negative peak relative to the start of the current time window: The unit is s. The sampling frequency of the EEG signal is used. To avoid misidentifying normal noise fluctuations as MRCP negative peaks, the minimum potential value within the window is compared with the resting baseline of the corresponding channel. If the minimum potential value is not lower than the mean of the resting baseline minus 3 standard deviations, it is determined that no significant MRCP negative peak appears in the current window; the amplitude and latency of the MRCP negative peak corresponding to that channel are marked as missing values ​​and are not included in the current motor intention classification.

[0048] (3) ERD / ERS features: Calculate the event-related desynchronization / synchronization index of the μ and β bands, and extract the lateralization index of the μ band to form a total of 13-dimensional frequency domain features.

[0049] For the six channels C3, Cz, C4, CP3, CPz, and CP4, calculate the ERD / ERS exponents for the μ-band and β-band respectively. Let the current 1-second time window bandwidth power for the μ-band and β-band be... The average bandwidth power of the sliding baseline segment in the most recent 10 seconds of this frequency band is The baseline power is the ERD / ERS index, which is expressed in decibels as follows: .

[0050] The three types of features are concatenated to form a total of 73 dimensions. To reduce dimensionality and remove redundancy, this embodiment uses a selected feature index to extract EEG features consistent with the feature index from the real-time acquired EEG signals. The feature index is selected from the 73 dimensions using a forward feature selection method based on mutual information during the offline training phase, selecting the top 30-40 feature subsets with the highest mutual information values ​​with the target category.

[0051] The forward feature selection method based on mutual information includes calculating the EEG features of each dimension. Compared with the expected motion state category The probability of their joint occurrence, i.e., the mutual information value. Then, all mutual information values ​​are sorted from largest to smallest, and the top 30-40 values ​​with the highest mutual information are selected as feature indices.

[0052] If mutual information value If the value is zero, it means that the feature is completely independent of the expected motion state category and does not help with classification; therefore, the feature is removed. The mutual information value is... The larger the value, the stronger the ability of that feature dimension to distinguish different expected motion state categories; feature In this embodiment, the values ​​of a one-dimensional EEG feature are discretized by binning. Mutual information is defined as follows:

[0053] in Eigenvalues and expected motion state category The probability of them appearing together and These represent the marginal probabilities of the feature and the expected motion state category, respectively.

[0054] Step 2: Input the above features into the motor intention classification model, and output the motor intention category and its confidence level. Then, a stability assessment is performed. If the same motor intention remains consistent across multiple consecutive time windows, or if its proportion exceeds a set percentage in the most recent time window, the intention is considered stable. If the intention is unstable, the system continues to collect EEG signals without triggering electrical stimulation. Once the intention is stable, its confidence level is further assessed to see if it exceeds a preset threshold. If the confidence level is higher than the threshold, the intention is classified as a valid motor intention, and corresponding stimulation target information is generated. Figure 2 As shown. Determine the target muscle group and direction of movement based on the intention of the movement, such as the target muscle groups corresponding to wrist extension, grasping, ankle dorsiflexion, and knee extension.

[0055] In the classification and recognition phase, EEG features are classified according to a preset neurorehabilitation training task. In this embodiment, the motor intention category can be simplified into 7 labels: 0 Resting or no intention, 1 Motor preparation intention, 2 Wrist extension, 3 Finger grasping, 4 Ankle dorsiflexion, 5 Knee extension, and 6 Stop intention. Among these, resting or no intention indicates that the patient has not yet generated a clear active motor intention; motor preparation intention indicates that the patient has shown EEG changes related to attempting movement, but has not yet entered the stable movement execution stage; 2 Wrist extension, 3 Finger grasping, 4 Ankle dorsiflexion, and 5 Knee extension are all target motor intentions, indicating that the patient wishes to perform the target action corresponding to the current rehabilitation task; Stop intention indicates that the patient wishes to end the current action or the system detects that the patient has actively withdrawn from training. After the classifier discriminates the input feature vector, it outputs the probability value of each motor intention category, selects the category with the highest probability as the current candidate motor intention, and uses the probability value corresponding to that category as the confidence level of the current intention. The specific joints and muscle groups of the target movement are not separately subdivided by the EEG classifier, but are determined by the current training task configuration. If a treatment uses only one target action, the 7-class classification model is still retained, but the main control calculation module only allows the target action labels registered in the current treatment plan to trigger stimuli, and other target action labels are treated as invalid intentions.

[0056] In this embodiment, the motion intent classification model can employ one of four algorithms: random forest, support vector machine, linear discriminant analysis, or lightweight neural network. The specific algorithms are as follows: (I) Training data preparation (shared by all four algorithms) During the offline calibration phase, the patient wears an EEG cap while sitting in a treatment chair or stands while wearing rehabilitation equipment. Task prompts are presented on the screen in the following paradigm: Blank screen (1 s) → gaze at the crosshair (2 s) → task instructions appear (e.g., "imagine extending your wrist", "imagine grasping", "stay relaxed") → motion visualization or attempt to move phase (3 s) → rest (3-4 s, screen prompt "relax").

[0057] Each of the seven types of intents mentioned above is repeated 40-50 times; the entire calibration and data collection process takes approximately 25-35 minutes. During the data collection, all raw EEG channel data, task markers, and prompt start and end timestamps are recorded simultaneously.

[0058] After data acquisition, the raw data underwent offline preprocessing (consistent with the online process: notch filtering, bandpass filtering, and artifact suppression), and was then segmented into 1.0 s windows with 0.2 s steps. For the 3-s period of the motor imagery / attempted movement phase, approximately 11 valid windows were generated per trial, labeled with the corresponding intention category; for the rest phase, approximately 6 windows were generated from the middle 2 seconds, labeled as the resting category. Each category generated approximately 400-600 labeled windows, totaling approximately 2800-4200 samples. For each window, the aforementioned 73-dimensional EEG features (44-dimensional frequency band energy + 16-dimensional time domain + 13-dimensional ERD / ERS) were extracted, and then the first 40 dimensions were retained through mutual information forward selection to form the final training set. , X represents the training feature matrix. Let X represent the real number field, where N represents the total number of labeled windows, and 40 represents that each window retains 40 features. Therefore, X has N rows and 40 columns; y represents the label vector of length N.

[0059] (II) Establishment of Random Forest Model structure: An ensemble classifier consisting of 150 classification decision trees. The construction process is as follows: (1) For the training set 150 bootstrap samplings with replacement were performed, each time drawing a subset of samples equal to the original training set. Approximately 63.2% of the samples were selected, and the remaining 36.8% were used as out-of-bag (OOB) samples for internal validation.

[0060] (2) For each tree, recursively split it starting from the root node. At each node, randomly select features from the 40-dimensional features. Dimension is used as a candidate splitting feature. For each candidate feature, the decrease in Gini impurity is calculated for all possible splitting points. The feature and splitting point with the largest decrease are selected as the splitting rule for that node. Gini impurity is defined as... ,in Category within this node The sample proportion.

[0061] (3) Recursively split until the stopping condition is met: the node depth reaches the maximum depth of 10 layers, or the number of samples in the node is less than the minimum number of samples in the leaf node of 6, or the node is pure (all samples are of the same type).

[0062] (4) After all 150 trees have been grown, calculate the OOB accuracy as an internal evaluation. Then use five-fold cross-validation to evaluate the generalization accuracy, requiring an overall accuracy ≥72% and a resting class recall ≥85%.

[0063] Online decision-making and confidence output: For the 40-dimensional feature vector of the current window, each of the 150 trees reaches a leaf node along its decision path, and the majority class label of that leaf node is output. Let the class... The number of votes received was Then the probability of this category is Choose the category with the highest probability. For candidate intent, This represents the original confidence level of the window.

[0064] (III) Establishment of Support Vector Machine (SVM) Model Structure: A multi-class SVM with radial basis function (RBF) kernel is used. The multi-class strategy is one-to-one, and the seven intentions are combined in pairs to generate the model. A binary subclass SVM. The establishment process is as follows: (1) Feature standardization: Calculate the mean and standard deviation for each feature dimension of the training set, and perform zero-mean unit variance standardization. Save the standardization parameters and use the same parameters to standardize new samples in the online phase.

[0065] (2) Hyperparameter search: The RBF kernel parameters are determined by five-fold cross-validation grid search. and regularization parameters The search scope is , There are 25 possible combinations. The average accuracy of each combination is calculated on a 50% CV, and the combination with the highest accuracy is selected as the final hyperparameter.

[0066] (3) Model Training: 21 binary SVMs were trained on the entire training set with optimal hyperparameters. Each binary sub-SVM was trained using only training samples from the corresponding two classes of intent, and the following soft-margin SVM optimization problem was solved:

[0067] constraint , ,in Let w be the implicit nonlinear mapping corresponding to the RBF kernel function, w be the weight vector of the classification hyperplane, and b be the bias of the classification hyperplane. Let be the relaxation variable for the i-th training sample, used to allow some samples to have classification errors or be within the classification margin. C is the misclassification penalty coefficient, and i iterates through the two classes of intent samples currently participating in the training. Let i be the 40-dimensional standardized feature vector corresponding to the i-th sample. Take +1 or -1 as the binary classification label for the i-th sample. Let be the squared L2 norm of the weight vector w, used to control the classification margin. Under the constraints, decrease... This corresponds to increasing the classification interval.

[0068] The training uses the Sequential Minimal Optimization (SMO) algorithm to solve the dual optimization problem of SVM, and obtains the support vectors, support vector coefficients and corresponding decision functions of each sub-SVM. The magnitude of these values ​​reflects the discriminative distance of the sample relative to the classification hyperplane.

[0069] (4) Probability calibration: For each binary SVM, the Platt scaling method is used to adjust the output discriminant distance. This is converted to a posterior probability. Specifically, sigmoid parameters are fitted onto the training set. and :

[0070] This represents the posterior probability that the current sample belongs to the positive class in the binary SVM. This is the output of the discriminant function for the sub-SVM; parameters , To calibrate the Sigmoid parameters and avoid overconfidence caused by directly fitting the training data, the parameters are estimated using the maximum likelihood method on five-fold internal cross-validation.

[0071] (5) Multi-class probability fusion: The 21 sub-SVMs output the pairwise probabilities between corresponding class pairs. Using the pairwise coupling method proposed by Wu et al., the pairwise probabilities are fused into a complete posterior probability distribution of 7 classes. ,make .in, This represents the posterior probability that the current sample belongs to the c-th type of motion intent.

[0072] Online Judgment and Confidence Output: During online recognition, for the standardized feature vector of the current window, each of the 21 sub-SVMs calculates the discriminant distance and outputs paired probabilities after Platt scaling. These probabilities are then fused into 7 classes through pairwise coupling. The class with the highest probability is selected as the candidate intent, and its corresponding probability is the confidence score.

[0073] (iv) Establishment of Linear Discriminant Analysis (LDA) Model structure: Fisher linear discriminant analysis projects the 40-dimensional feature space onto a 6-dimensional (number of classes - 1) discriminant space. The establishment process is as follows: (1) Calculate the intra-class scatter matrix and inter-class scatter matrix :

[0074] in For category The mean vector, The global mean. For category The number of samples.

[0075] (2) Solving for the projection matrix: For Perform eigenvalue decomposition, and use the eigenvectors corresponding to the top 6 largest eigenvalues ​​to form a projection matrix. Because the dimensions of EEG characteristics may lead to Approaching the strange, to Applying contraction regularization Shrinkage coefficient Automatically estimated using the Ledoit-Wolf method.

[0076] (3) Calculate various parameters after projection: Project the training samples into 6-dimensional space Calculate the mean of each class in the projection space. and common covariance matrix (LDA assumes that all types of covariance are the same).

[0077] Online judgment and confidence output: For the feature vector of the current window Calculate projection Then calculate the posterior probability of each category. Assume that the prior probabilities of each category are equal ( The posterior probability is calculated using the Gaussian discriminant function:

[0078] Normalization for all categories The category with the highest probability is the candidate intent, and the corresponding probability is the confidence level.

[0079] (V) Establishment of Lightweight Neural Network (1D-CNN) Model structure: One-dimensional convolutional neural network, directly using preprocessed EEG time series as input, without manual feature extraction.

[0080] Each input sample corresponds to an EEG data window of 1.0 s length, with a sampling rate of 1000 Hz. Eight EEG channels are selected as input, therefore the input data shape is as follows: Where 8 represents the number of EEG channels, and 1000 represents the number of sampling points per channel within 1.0 s. The network structure is as follows: The input EEG time series first passes through a first-layer one-dimensional convolution to extract short-term local temporal features. This convolutional layer has 16 filters, a kernel length of 25, a stride of 1, and uses the ReLU activation function. Batch normalization and max pooling are then performed to reduce the temporal dimension. After processing by the first convolutional module, the features are further processed by a second-layer one-dimensional convolution to extract higher-level temporal features. This convolutional layer has 32 filters, a kernel length of 10, a stride of 1, and uses the ReLU activation function, again undergoing batch normalization and max pooling. The features from each channel are then flattened and concatenated to form a one-dimensional feature vector, which is then sequentially input into a first fully connected layer with 128 units and a second fully connected layer with 64 units. Both fully connected layers use the ReLU activation function, and Dropout is applied to reduce the risk of overfitting. Finally, the output of the second fully connected layer is passed through the Softmax classification layer to obtain the probability distribution of 7 types of motion intentions. The category with the highest probability is selected as the current recognition result, and this probability value is used as the intention confidence.

[0081] ReLU is an element-wise nonlinear activation function used to enhance the network's ability to express nonlinear EEG temporal patterns. For the input value z, ReLU is calculated as follows: That is, when the input value is less than 0, the output is 0; when the input value is greater than or equal to 0, the original value is retained and the output is maintained.

[0082] Dropout is a regularization method used during the training phase to reduce excessive dependencies between neurons, thereby reducing the risk of model overfitting. In this embodiment, the Dropout rate for both fully connected layers is set to 0.5. During training, each neuron is randomly zeroed with a probability of 0.5; for neurons that are not zeroed, their output is divided by the retention probability of 0.5, i.e., inverse scaling is used to keep the expected output consistent between the training and inference phases. Random dropout is disabled during the inference phase, so Dropout does not change the number of network layers or randomly delete neurons.

[0083] The Softmax function is used to convert the seven raw output values ​​of the network's output layer into class probabilities that sum to 1. , ; This represents the logit value corresponding to the c-th type of motion intent. The logit value is the original network output before the Softmax layer. Online decision-making and confidence output: The 8-channel × 1000-point raw preprocessed EEG data of the current window is directly input into the quantized 1D-CNN. The Softmax output layer generates 7 probability distributions. The category with the highest probability is the candidate intent, and the corresponding probability is the confidence level. Since the neural network's Softmax output may be overconfident (with a probability close to 1.0 for a certain class), temperature scaling can be applied before the Softmax function. Temperature parameters On the validation set, calibration is performed by minimizing the negative log-likelihood, typical value. This allows the probability output to better reflect the true confidence level.

[0084] (vi) Unified judgment criteria and output interface for the four models Regardless of the algorithm used, the model output interface is uniformly: candidate intent category. The category label with the highest probability (0-6); confidence level This is the posterior probability value (0-1) corresponding to this category. This output is generated every 200 ms (once per sliding window) and passed to the subsequent stability assessment module. The subsequent module does not care which classifier is used at the underlying level; it only receives the two values: category and confidence score.

[0085] Determining valid movement intentions: Time window definition: The aforementioned sliding window (length 1.0 s, step size 0.2 s) is the "time window". A new classification result is generated every 200 ms. "Several consecutive time windows" refers to a number of most recent consecutive time windows. This embodiment saves the classification output of the most recent 5 time windows.

[0086] Stability judgment rule: Let the sequence of candidate intent categories output in the most recent 5 time windows be... ( (The most recent), among which the most frequently occurring non-resting category is denoted as The number of times it appears is recorded as .

[0087] Ignore the resting category (category 0) and count the occurrences of each of the remaining categories. Find the non-resting category with the highest frequency. and the number of times it appears .

[0088] like (At least 3 out of 5 windows output the same non-resting intent), and If the latest window also displays the same intent, then the intent is considered stable. Otherwise, it is determined to be unstable, and the data collection continues without triggering electrical stimulation.

[0089] Confidence judgment rule: Assuming the intent is stable, further checks are performed: The average confidence level of this intention within a stable window ; Confidence of the latest window .

[0090] If both conditions are met, the movement intention is deemed valid.

[0091] Invalid movement intent: Any of the following situations shall be deemed invalid: Non-resting intentions occurred less than 3 times in 5 windows (unstable); The average confidence level is below 0.72 (insufficient classification reliability); The latest window confidence level is below 0.68 (current instantaneous confidence level is insufficient); In the last 5 windows, there are more than 2 different non-resting intentions and none of them are dominant (intention confusion).

[0092] Invalid intent does not trigger any electrical stimulation output. Continue collecting EEG data and wait for the next window to be evaluated.

[0093] In this invention, the determination of validity / invalidity is based entirely on EEG classification results and confidence level, regardless of whether the patient simultaneously generated electromyographic activity (i.e., whether it was an attempt at movement). Whether it is motor imagery or an attempt at movement, as long as the intention recognition at the EEG level passes both stability and confidence level assessments, it is considered valid. However, the corresponding electromyographic state (attempt at movement / motor imagery / uncertain) for this valid intention is recorded in the log for the therapist's reference.

[0094] Step 3: Select the target muscle group and initial stimulation parameters according to the exercise intention. After stimulation, the electromyography (EMG) acquisition module acquires EMG signals from the target muscle group and related muscle groups. The EMG signals are filtered, rectified, smoothed, and windowed, and EMG amplitude, root mean square value, integrated EMG, activation sequence, and fatigue characteristics are extracted. Target muscle group EMG is used to determine whether the stimulation produces effective activation, while related muscle group or antagonist muscle EMG is used to determine whether abnormal co-contraction occurs. For example... Figure 3 As shown.

[0095] EEG motor intention is not simply a switch to initiate fixed stimuli, but rather a means to generate stimulus target information. This stimulus target information includes the target muscle group, the stimulation channel, the timing of stimulation initiation, and the initial stimulation parameters. The initial stimulation parameters can be determined from the patient's prior calibration results, physician-defined ranges, or system history records, and include the initial stimulation current intensity, frequency, pulse width, and stimulation duration.

[0096] The system maintains an "intent-stimulus mapping table" in the main control computing module, mapping each type of motor intent to the target muscle group, stimulation channel, and initial stimulation parameters. This mapping table is configured and stored by the therapist based on the patient's functional assessment results during the offline calibration phase. Taking "wrist extension intent" as an example, the generation process of stimulation target information is illustrated. The EEG intent recognition module outputs the current candidate motor intent as wrist extension intent, and simultaneously outputs the confidence level of this intent. When the confidence level is higher than a preset threshold, and the motor intent remains stable across multiple consecutive recognition windows, the main control computing module recognizes the wrist extension intent as a valid motor intent. Subsequently, the main control computing module calls the pre-stored "intent-stimulus mapping table," finds the corresponding target muscle group (radial wrist extensor muscles) based on the wrist extension intent, the corresponding stimulation channel (CH1), and the corresponding initial stimulation parameters (initial current intensity 15 mA, initial pulse width 250 μs, initial frequency 30 Hz, stimulation duration 3.0 s).

[0097] Method for determining initial stimulation parameters: When the patient uses the system for the first time, the therapist performs the "stimulation threshold calibration" procedure. Starting with a low current intensity (5 mA) for each target channel, the stimulation current intensity is gradually increased in increments of 2 mA, with a fixed frequency of 30 Hz and a fixed pulse width of 200 μs. Each stimulation level lasts for 1 s. The therapist and the system simultaneously observe: (1) the sensory threshold current intensity (1) The patient first reported the intensity of the electrical stimulation. (2) Motor threshold current intensity (3) Maximum comfort stimulation current intensity Patients report current intensity at which stimulation has reached the edge of causing discomfort.

[0098] The initial stimulation current intensity is set to The target position is approximately 30% above the motion threshold current intensity and within the range of the maximum comfortable stimulation current intensity. The initial pulse width is set to 200-300 μs (the pulse width used during calibration). The initial frequency is set to 30-35 Hz (the commonly used frequency range for functional electrical stimulation to induce fusion contractions). The stimulation duration is set according to the target movement (2-3 s for simple single-joint movements, 3-5 s for complex movements).

[0099] In subsequent training, if the system has historical records, the initial parameters are taken as the median of the stimulus parameters corresponding to the intent in the most recent 3 training sessions, instead of being recalibrated each time.

[0100] Stimulation initiation timing: After the EEG intention passes the stability and confidence assessment (see above), the system sends a command to the stimulation output circuit in the next control cycle (within 1 ms). The delay from valid intention confirmation to the output of the first stimulation pulse does not exceed 50 ms.

[0101] Electromyography (EMG) signals were acquired using an 8-channel wireless surface EMG acquisition system. Each channel consisted of a pair of Ag / AgCl patch differential electrodes (20 mm apart) and a miniature wireless front-end module mounted adjacent to them. The front-end module performed differential amplification (1000x gain, common-mode rejection ratio ≥100 dB), hardware bandpass filtering (20-500 Hz), and analog-to-digital conversion (16-bit, sampling frequency 1000 Hz). The data was then wirelessly transmitted to the main control computing module via BLE.

[0102] Before attaching the electrodes, clean the skin surface of the target muscle with an alcohol swab and apply a thin layer of conductive gel to reduce the electrode-skin impedance to below 5 kΩ. The electrodes are attached along the longitudinal axis of the muscle fibers, with the center point of the differential electrode pair aligned with the most prominent part of the muscle belly (near the motor point). Electromyographic signals of the relevant muscle group are collected based on the proximity of the electrodes to that muscle group.

[0103] Target muscle group electromyography (EMG) refers to the surface EMG signals generated by the muscle group subjected to electrical stimulation. When electrical stimulation successfully induces contraction of the target muscle, a significant increase in the EMG envelope should be observed in the acquisition window after the stimulation blanking window ends.

[0104] Related muscle group electromyography (EMG) refers to the electromyographic signals of accessory muscles that coordinate with the target movement. For example, in wrist extension, the extensor digitorum is a synergist, and moderate activation is normal. One to two channels should be configured.

[0105] "Antagonist electromyography" refers to the electromyographic signals of the muscle group that moves in the opposite direction to the target movement. For example, in wrist extension, the radial and ulnar flexor carpi radialis muscles are antagonist muscles. Normally, when the target muscle group (extensor muscles) is activated by electrical stimulation, the antagonist muscles (flexor muscles) should maintain a low level of activation. If the antagonist muscles also show significant activation, it indicates abnormal co-contraction. Two channels are placed on the antagonist muscles.

[0106] Adjustment rules: If the electromyography (EMG) of the target muscle group is below the effective activation threshold and the antagonist muscle is not abnormally activated, the system determines that the stimulation is insufficient and increases the stimulation current intensity or pulse width in the next cycle. If the EMG of the target muscle group reaches the effective activation range and the co-contraction index of the antagonist muscle does not exceed the threshold, the current stimulation parameters are maintained. If the EMG of the target muscle group is too high or the co-contraction index of the antagonist muscle exceeds the threshold, the system determines that the stimulation is too strong or that there is abnormal co-contraction, and decreases the stimulation current intensity or pulse width in the next cycle. Stimulation parameter adjustments are made using small increments or decreases, and are always limited to the safe range set by the therapist.

[0107] Electromyographic signal processing includes: (1) Blanking window processing: During the electrical stimulation pulse (1 ms before the pulse to 2 ms after the pulse), the amplifier input terminal at the front end of the EMG acquisition is shorted to the reference potential by an analog switch, and the output data is marked as invalid. The amplifier is restored after the blanking window ends. Taking a stimulation frequency of 30 Hz as an example, the pulse interval is about 33.3 ms, the pulse width is 300 μs, the total blanking window is about 3.3 ms, which accounts for about 10% of one pulse cycle. The remaining effective EMG acquisition time of about 30 ms is sufficient to extract the M wave (the compound muscle action potential induced by electrical stimulation, with a latency of about 5-15 ms) and the voluntary EMG component.

[0108] (2) Filtering: Perform 20-450 Hz bandpass filtering (4th order Butterworth) and 50 Hz notch filtering on the effective data segments outside the blanking window.

[0109] (3) Full-wave rectification: Take the absolute value of the filtered signal.

[0110] (4) Low-pass smoothing: The electromyographic envelope is extracted using a 4th-order Butterworth low-pass filter with a cutoff frequency of 6 Hz.

[0111] (5) Normalization: Same as the normalization method described above. If the patient is unable to complete the test, the maximum electromyographic envelope value induced by motor threshold current intensity electrical stimulation is used as the reference baseline during the initial calibration phase (denoted as ). Subsequent online data will be divided by ), .

[0112] (6) Windowing: The evaluation window period is 200 ms, which is consistent with the step size of the EEG analysis window. Features are extracted from the effective data segment (after removing the hidden window) within each window.

[0113] Feature extraction includes extracting the following features within each 200 ms evaluation window: In this embodiment, 16 basic features are input to the rule determiner, including: 4-dimensional normalized electromyography envelope mean, 4-dimensional root mean square, 4-dimensional integral electromyography, 2-dimensional activation timing features, and 2-dimensional fatigue features.

[0114] Normalized electromyographic envelope mean (4-dimensional): Normalized electromyographic envelope mean of target muscle group 2 channels and antagonist muscle 2 channels.

[0115] Root Mean Square (RMS) (4-dimensional): The RMS value of each channel within the valid data segment of the window. ,in These are the original (unrectified) electromyographic (EMG) sample values ​​after filtering. This represents the number of valid sampling points.

[0116] Integral electromyography (iEMG) (4D): The area of ​​the rectified signal in each channel within the window. , s.

[0117] Activation timing characteristics (2D): Target muscle group activation delay Compared to the activation sequence of antagonist muscles, the activation of target muscle groups is delayed. The time interval from the moment the first pulse of electrical stimulation is emitted to the moment when the electromyographic envelope of the target muscle group first exceeds the mean of the resting baseline plus 3 standard deviations. Normal electrical stimulation induces an M-wave delay of about 5-15 ms, and if it includes voluntary contraction components, a second peak may appear at 50-200 ms.

[0118] Relative timing of antagonist muscle activation: The difference between the time when the antagonist muscle's electromyographic envelope exceeds the resting baseline and the time when the target muscle group is activated. A positive value indicates that the antagonist muscle is activated later than the target muscle group (normal), while a negative value or close to zero indicates that the antagonist muscle and the target muscle group are activated almost synchronously (abnormal co-contraction).

[0119] Fatigue characteristics (2D): Median frequency Power spectrum estimation (Welch method) is performed on the electromyographic signals of the target muscle group within a window, and the median frequency is calculated. The median frequency decreases during muscle fatigue.

[0120] Median frequency change rate: The ratio of the median frequency in the current window to the median frequency of the baseline over the most recent 30 seconds. A ratio below 0.85 suggests a fatigue trend.

[0121] (7) Electromyographic response assessment: Within each 200 ms assessment window, the rule judge is executed in sequence according to a fixed priority: effective activation judgment, abnormal co-contraction judgment. If it is effective activation and does not belong to abnormal co-contraction, the stimulation effect assessment is performed.

[0122] Effective activation determination: After electrical stimulation output, the target muscle group is evaluated for effective activation during the valid data segment after the blanking window ends. Determination is performed within each 200 ms evaluation window, based on the following criteria: Criterion 1: M-wave detection. The complex muscle action potential (M-wave) induced by electrical stimulation via motor nerves typically appears 5-15 ms after the stimulation pulse and lasts approximately 10-20 ms. The peak amplitude of the electromyography (EMG) signal in the target muscle group channel is detected within a 5-25 ms period after the blanking window ends. If this peak amplitude exceeds the mean of the resting baseline plus three standard deviations (the resting baseline is collected during a 10-second silent period before the start of training), the presence of an M-wave is confirmed.

[0123] Basis 2: Continuous activation of the electromyographic envelope. For the effective data segment within the 200 ms evaluation window, the normalized mean electromyographic envelope value of the target muscle group channel was calculated. The normalized reference value is... The maximum envelope peak value induced by the motion threshold current intensity stimulus during the calibration phase.

[0124] like (That is, reaching more than 15% of the reference value) is considered as effective activation; like It was determined to be weak activation (classified as "insufficient response"); like Furthermore, no M-wave was detected, indicating no activation (classified as "insufficient response").

[0125] Determination of abnormal co-contraction: Abnormal co-contraction refers to the phenomenon where, when a target muscle group is activated by electrical stimulation, the antagonistic muscle, which should remain relaxed, also undergoes significant synchronous contraction. This phenomenon may be related to abnormal movement patterns, spasticity, or diffusion of the stimulating current following central nervous system injury.

[0126] The degree of co-contraction is determined by the Co-contraction Index (CCI).

[0127]

[0128] in The normalized mean of the envelope of the target muscle group. The normalized envelope mean of the antagonist muscle is denoted as CCI. The CCI ranges from 0 to 1. When only the target muscle group is activated and the antagonist muscle group remains underactivated, the CCI is close to 0; when the activation levels of the target and antagonist muscle groups are similar, the CCI = 1. When CCI > 0.55, abnormal co-contraction is considered to be present.

[0129] In the absence of abnormal co-contraction and fatigue trend, the stimulation effect is judged based on the normalized envelope mean, root mean square RMS value, integrated electromyography (iEMG), activation sequence characteristics, and fatigue characteristics of the target muscle group.

[0130] In this invention, the method for evaluating electromyographic response is not limited to a single feature. It can employ root mean square value, mean absolute value, integral electromyography, activation delay, frequency domain features, time-frequency features, fatigue-related features, or multi-channel synergistic electromyographic features.

[0131] Step 4: Based on the above characteristics, determine the current stimulus effect and assess the classification of muscle response after stimulation, including abnormal enhancement of antagonist muscle, fatigue trend, insufficient response, appropriate response, and excessive response.

[0132] Muscle response classification: The muscle response assessment module uses a rule-based threshold method to classify the above features. The classification is performed in the following priority order; once a classification condition is met, the corresponding result is output, and subsequent rule classifications within that window cease: Criterion 1: Abnormal enhancement of antagonistic muscle: Condition: RMS antag RMS target × 0.60, and the relative timing of antagonist muscle activation is <30 ms (almost synchronous or prior to the target muscle group). RMS antag The root mean square value of the antagonistic muscle group, RMS target This represents the root mean square value of the antagonistic muscle group.

[0133] Meaning: Electrical stimulation induces contraction of the target muscle group, but the antagonist muscle is also significantly activated, resulting in abnormal co-contraction, which may be caused by spasm or diffusion of the stimulation current.

[0134] Judgment 2: Fatigue trend: condition: Furthermore, the median frequency of the most recent three consecutive assessment windows is lower than 85% of the baseline. This represents the ratio of the median frequency of the target muscle group's electromyographic signals within the current 200 ms window to the median frequency of the resting baseline data 30 s before the start of training; when Less than 0.85, and for 3 consecutive windows Only values ​​less than 0.85 are output to indicate fatigue trend.

[0135] Meaning: The target muscle group is fatigued. Continuing to stimulate it with the current parameters may lead to a continued decrease in contractility or induce spasms.

[0136] Judgment 3: Overly strong response: Conditions: The mean normalized envelope of the target muscle group is >0.80 (i.e., muscle activation exceeds 80% of the reference baseline), or the range of motion of the joints is observed to exceed the upper limit of the target range set by the therapist by 120% online.

[0137] Meaning: Excessive stimulation can cause excessive muscle contraction, potentially leading to discomfort or injury.

[0138] Judgment 4: Insufficient response: Conditions: The normalized mean envelope of the target muscle group is <0.15, and the activation delay is significant. >20 ms (exceeding the normal M-wave delay range, indicating no effective electrically evoked contraction), or the target muscle group envelope never exceeds the resting baseline + 3 standard deviations within 200 ms after stimulation output.

[0139] Meaning: The stimulation failed to effectively induce contraction of the target muscle, possibly due to insufficient stimulation intensity, electrode misalignment, or severe muscle atrophy.

[0140] Judgment 5: The response is appropriate. Conditions: The normalized mean envelope value of the target muscle group is between 0.15 and 0.80. The activation delay is within the normal range.

[0141] Meaning: The stimulus parameters are currently well matched.

[0142] Step 5: After each stimulation cycle ends and 200 ms of electromyography assessment is completed, the stimulation parameter adjustment module performs closed-loop updates on the parameters for the next stimulation cycle based on the muscle response classification results obtained in Step 4.

[0143] Based on the priority of "abnormal enhancement of antagonistic muscle - fatigue trend - over-response - under-response - appropriate response", only the update rule corresponding to the first hit response category is executed in each evaluation window.

[0144] Parameter adjustment rules: Each stimulation cycle includes a stimulation duration phase and a 200 ms post-stimulation electromyography (EMG) assessment phase. After the current cycle ends, the stimulation parameter adjustment module updates the stimulation parameters for the next cycle based on the muscle response assessment results. Adjustment is performed in a stepped, incremental manner, with limited adjustments each time to avoid drastic parameter changes.

[0145] When the antagonist muscle is abnormally enhanced, reduce the intensity of the stimulation current and decrease the pulse width: (1) Current stimulation current intensity A decrease of 3 mA results in a 25 μs reduction in pulse width. mA, μs. After the update, the stimulation current intensity and pulse width are limited to 5mA -I. lim 50-500 μs; if the stimulation current intensity and pulse width have reached the lower limit, then maintain the lower limit stimulation parameters and do not continue to decrease them, and record the state of "abnormal enhancement of antagonistic muscle and limitation of lower limit of parameters".

[0146] (2) If two consecutive stimulation cycles are determined to show abnormal enhancement of the antagonist muscle, the stimulation parameter adjustment module will switch to the next alternative stimulation channel according to the channel configuration table pre-registered by the therapist, and continue stimulation using the initial stimulation parameters corresponding to the channel or the most recent safe stimulation parameters. If abnormal enhancement of the antagonist muscle is observed in all alternative stimulation channels, the stimulation output corresponding to the current target action will be stopped, the abnormal status will be recorded, and the therapist will be prompted to check.

[0147] When fatigue is detected—reduce the stimulation frequency, shorten the stimulation duration, or lengthen the rest interval between adjacent stimulation cycles: (1) The current stimulation frequency is reduced by 5 Hz, the stimulation duration is shortened by 0.5 s, and the rest interval is extended by 2 s; (2) After the update, the frequency, duration and rest interval are limited to 15-50 Hz, 1-8 s and 4-20 s respectively. If the stimulation frequency and stimulation duration have reached the lower limit and the rest interval has reached the upper limit, then keep the boundary parameters unchanged and record the state of "fatigue trend and parameter adjustment is limited"; If fatigue is still present after three consecutive stimulation cycles, pause the stimulation for 60 seconds. After the pause, training can continue using reduced stimulation parameters, or stimulation can be resumed after the next effective movement intention is confirmed.

[0148] If the response is too strong, reduce the intensity of the stimulation current and shorten the stimulation duration, or further shorten the stimulation pulse width: (1) Current stimulation current intensity The stimulation current was reduced by 2 mA, and the stimulation duration was shortened by 0.5 s; after the update, the stimulation current intensity and duration were limited to 5 mA. lim 1-8 s; (2) If the current intensity, stimulation duration, and pulse width have all reached the lower limit, and the response is still judged to be too strong in the next stimulation cycle, then based on the above adjustments, the stimulation pulse width is further shortened by 50 μs: If the response is insufficient, increase the intensity of the stimulation current or increase the pulse width: (1) First increase the intensity of the stimulation current: the current intensity of the stimulation current Increase by 2 mA, that is mA. like Maximum comfort stimulation current intensity has been reached. If the current intensity is 90% or less, then the pulse width will be increased instead of the stimulation current intensity.

[0149] (2) Increase pulse width: Current pulse width Increase by 50 μs, that is μs, with a maximum of 500 μs.

[0150] (3) If the stimulation current intensity and pulse width have reached the upper limit but the response is still insufficient, record the abnormality and prompt the therapist to check the electrode position.

[0151] When the response is appropriate, keep the stimulus parameters constant: After each stimulation parameter update and before the start of the next stimulation cycle, the safety protection module performs safety checks on the updated stimulation commands in a fixed sequence. Only when all checks pass are the electrical stimulation pulses for the next stimulation cycle allowed to be output.

[0152] (1) Current limiting verification: according to Limit the current command to ensure that the stimulation current does not exceed the patient's maximum comfortable stimulation current intensity. Upper limit of individual current during operation and the upper limit of the device current: The minimum value in.

[0153] (2) Electrode-skin impedance calibration: Detect the impedance between the stimulating electrode and the skin. Only if the following conditions are met: If the condition is met, proceed to the next verification step.

[0154] (3) Single pulse charge density verification: calculated according to the principle that the single pulse charge is equal to the product of the stimulation current and the pulse width: ; in, The unit is , The unit is Let the effective electrode area be... Then the single-pulse charge density is: Only if: If the condition is met, proceed to the next verification step.

[0155] (4) Output current readback verification: After outputting the first test pulse, read the actual output current. And calculate its relationship with the command current. Relative deviation:

[0156] Only if: When the safety check is passed, the electrical stimulation pulse for the next stimulation cycle is allowed to be output.

[0157] After all four checks pass, the next stimulation cycle is executed; if any check fails, the safety protection module immediately shuts down the H-bridge output of the corresponding channel, sets the current command to zero, records the fault code, and triggers an alarm. When the emergency stop button is pressed, the power supply to the stimulation output stage is directly cut off without waiting for software judgment.

[0158] For example, in a wrist extension exercise, the initial parameters are a stimulation current intensity of 15 mA, a pulse width of 250 μs, and a frequency of 30 Hz. The first cycle is assessed as insufficient response, so the stimulation current intensity is increased to 17 mA. In the second cycle, the response is still insufficient, so the stimulation current intensity is increased to 19 mA. In the third cycle, the response is assessed as adequate, and the parameters are locked at 19 mA / 250 μs / 30 Hz.

[0159] Example 3:

[0160] A device, such as Figure 5 As shown, it includes an EEG acquisition front-end, an EMG acquisition front-end, a main control and processing unit, a functional electrical stimulation output circuit, an electrode interface, an isolation and protection circuit, a power management module, and a communication module. Among them: The EEG acquisition front end collects the patient's EEG signals through scalp EEG electrodes and performs low-noise amplification, filtering, and analog-to-digital conversion.

[0161] The electromyography (EMG) acquisition front end acquires EMG signals from the target muscle group and related muscle groups through surface EMG electrodes, and performs amplification, filtering, rectification, and analog-to-digital conversion.

[0162] The main control processing unit receives EEG and EMG data and runs algorithms for motor intention recognition, muscle response assessment, and stimulation parameter adjustment.

[0163] The functional electrical stimulation output circuit generates adjustable stimulation pulses based on the stimulation control commands output by the main control processing unit, and acts on the target muscle group or related peripheral neuromuscular pathways through stimulation electrodes.

[0164] Electrical stimulation parameters include stimulation intensity, stimulation frequency, pulse width, stimulation channel, and stimulation duration.

[0165] The isolation protection circuit is used to achieve electrical isolation between the acquisition end, the stimulation end and the main control unit, and provides current limiting, impedance detection, abnormal disconnection and emergency stop protection.

[0166] The power management module supplies power to all hardware modules, while the communication module is used for data interaction with the host computer, doctor's terminal, or rehabilitation management system.

[0167] Example 4:

[0168] Functional electrical stimulation methods are not limited to a single type of electrical stimulation waveform. Monophasic pulse, biphasic pulse, constant current stimulation, constant voltage stimulation, multichannel sequential stimulation, or combination stimulation can be used.

[0169] This embodiment uses a biphasic symmetrical square wave pulse by default: each stimulation pulse consists of a positive phase and an equal-amplitude reverse phase, with a 50 μs interval between the two phases. Biphasic stimulation results in zero net charge, avoiding electrolytic damage to tissues beneath the electrodes, making it the mainstream choice for functional electrical stimulation. The H-bridge structure of the stimulation output circuit in this system naturally supports biphasic output.

[0170] Monophasic pulses can be used when selective stimulation of nerve fibers in a specific direction is required. For example, when the goal is to selectively activate motor nerve fibers while reducing sensory fiber activation, a cathode monophasic pulse (with the cathode placed near the motor point) can be used. However, monophasic pulses result in net charge accumulation, necessitating limiting continuous stimulation time to no more than 10 seconds and inserting low-amplitude reverse DC bias (charge balancing) between pulses. The system imposes stricter charge density limitations (≤ 5 μC / cm²) on the monophasic mode in its safety protection module. 2 / pulse).

[0171] Constant current stimulation vs. constant voltage stimulation: This embodiment defaults to constant current mode—the stimulation output circuit maintains a constant set current value, unaffected by changes in electrode-skin impedance, ensuring the repeatability of muscle recruitment. In constant voltage mode, if skin sweating causes a decrease in impedance, the actual current passing through the muscle will increase, resulting in uncontrollable stimulation intensity. Therefore, constant voltage mode should only be used in special circumstances (such as portable scenarios where reduced stimulator power consumption is required), and the current needs to be read back in real time within each pulse, and the stimulation should be immediately cut off once the safety limit is exceeded.

[0172] Multi-channel sequential stimulation: When the target action involves the coordination of multiple muscle groups (such as grasping which requires the sequential activation of the superficial and deep flexor digitorum muscles), the system outputs stimulation to different channels sequentially. Taking grasping as an example: CH2 (superficial flexor digitorum muscles) outputs stimulation first and maintains it for 1.5 s → delayed for 200 ms → CH3 (deep flexor digitorum muscles) outputs stimulation and maintains it for 1.5 s. The sequence and delay are preset in the intention-stimulation mapping table and can be dynamically fine-tuned by the stimulation parameter adjustment module based on electromyographic feedback (for example, if the activation delay of the superficial flexor digitorum muscles is too large, the start time of CH2 can be advanced by 100 ms).

[0173] Combined stimulation: For patients with severe spasticity, a low-frequency (5-10Hz) low-intensity pre-stimulation can be applied to the antagonist muscle for 2 seconds before stimulating the target muscle group. This utilizes the long-term inhibition effect to reduce the excitability of the antagonist muscle, followed by normal-frequency stimulation of the target muscle group. This pattern has already been reflected in the aforementioned three-level treatment (abnormal enhancement of antagonist muscle).

[0174] Example 5:

[0175] Stimulus parameter adjustment strategies are not limited to rule-based thresholding. Lookup table methods, fuzzy control, proportional control, model predictive control, reinforcement learning, or other adaptive control methods can be used.

[0176] Combination of various regulation strategies with the present invention: Rule-based threshold method (default scheme in this embodiment): i.e., the graded step adjustment rule in the aforementioned S4 section. Advantages: Logically transparent, easy for safety review and clinical approval, and does not rely on training data. Disadvantages: Fixed adjustment step, which may not be flexible enough in responding to rapidly changing muscle states.

[0177] Taking the lookup table method as an example: During the offline phase, a systematic scan of stimulation parameters is performed on the patient. A two-dimensional grid of intensity × pulse width is used (e.g., intensity 5-40 mA in 5 mA increments, pulse width 100-500 μs in 100 μs increments, for a total of 8 × 5 = 40 combinations). Stimulation is applied to each combination, and the electromyographic response (normalized envelope mean) of the target muscle group is recorded. A two-dimensional lookup table is established, with each cell storing the muscle response value corresponding to that parameter combination. During online operation, the muscle response assessment module outputs the current response deviation ("target response - actual response"). The stimulation parameter adjustment module searches the lookup table for the parameter combination that makes the response closest to the target value and directly switches to that combination. Advantages: One-step approach, no need for multi-cycle gradual approximation. Disadvantages: Requires a relatively long offline calibration period (approximately 15-20 minutes), and the lookup table does not automatically update with patient fatigue or recovery. Suitable for scenarios with limited parameter space and short-term stable patient conditions.

[0178] For example: the target response value is set to 0.40 (normalized electromyography). The current parameter 15 mA / 250 μs corresponds to a response of 0.22 (insufficient response). Looking up the table, we find that 20 mA / 250 μs corresponds to a response of 0.38. The system directly switches to 20 mA / 250 μs.

[0179] Taking fuzzy control as an example: the electromyographic response deviation (target response - actual response) and the deviation change rate (current deviation - previous cycle deviation) are used as two fuzzy input variables, each divided into 5 linguistic levels (negative large NB, negative small NS, zero ZO, positive small PS, positive large PB). The output is the stimulus intensity adjustment amount. Similarly, divide into 5 levels. Establish 5 x 5 = 25 fuzzy rules, for example: If the deviation is PB (response is much lower than the target) and the rate of change of deviation is ZO (no trend of improvement), then For PB (significantly increased strength); If the deviation is ZO (close to the target) and the rate of change of the deviation is NS (slightly worse), then For PS (slightly increase intensity).

[0180] Mamdani inference and centroid deblurring are used to output continuous data. Advantages: Can handle uncertainty, smooth adjustment. Disadvantages: Rule design relies on expert experience, adjustment performance is sensitive to membership function parameters.

[0181] Example: Target response 0.40, actual response 0.28, deviation +0.12 (positive), deviation change rate -0.02 (slightly worsened), fuzzy inference output. mA, the system will increase the intensity by 2.8 mA.

[0182] The application of this invention is not limited to the lower limbs, but can also be applied to the upper limbs, hands, wrists, shoulders, ankles, and related muscle groups of the trunk.

[0183] The above embodiments are only used to illustrate the present invention and are not intended to limit the technical solutions described herein. Although the present invention has been described in detail with reference to the above embodiments, the present invention is not limited to the specific embodiments described above. Therefore, any modifications or equivalent substitutions to the present invention, as well as all technical solutions and improvements that do not depart from the spirit and scope of the invention, are covered within the scope of the claims of the present invention.

Claims

1. A closed-loop modulation method for neurorehabilitation based on the synergy of EEG-EMG-functional electrical stimulation, characterized in that, Includes the following steps: S1. Collect EEG signals from patients during the attempt to move or motor imagery phase, filter, suppress artifacts, and window the EEG signals, and extract frequency band energy, temporal statistical features, and spatial distribution features. S2. Input the above features into the motion intention classification model, output the motion intention category and its confidence level, and then perform a stability judgment. When the intention is stable, further judge whether its confidence level is higher than a preset threshold. If the confidence level is higher than the preset threshold, the intention is judged as a valid motion intention and the corresponding stimulus target information is generated. S3. Select the target muscle group and initial stimulation parameters according to the movement intention. After stimulation, collect the electromyographic signals of the target muscle group and related muscle groups. Filter, rectify, smooth and window the electromyographic signals and extract the electromyographic amplitude, root mean square value, integral electromyographic, activation sequence and fatigue characteristics. The electromyographic signal of the target muscle group is used to determine whether the stimulation produces effective activation. The electromyographic signal of related muscle groups or antagonistic muscles is used to determine whether abnormal co-contraction occurs. S4. Based on the features extracted in step S3, determine the current stimulation effect and evaluate the muscle response classification after stimulation according to the preset evaluation priority order. The muscle response classification includes abnormal enhancement of antagonistic muscle, fatigue trend, insufficient response, appropriate response, and excessive response. S5. Based on the evaluation results of step S4, perform the adjustment step of the stimulation parameters corresponding to the first hit response category with the highest priority, and update the functional electrical stimulation parameters for the next cycle; perform safety checks on the updated stimulation parameters in sequence, including the upper limit of individual patients, the output range of the device, the electrode impedance, the single pulse charge density and the current readback deviation check, and output the functional electrical stimulation pulse for the next stimulation cycle only when all checks pass; otherwise, stop the output of the corresponding stimulation channel and trigger an alarm. Continuously cycle through steps S1 to S5 to keep the stimulus output close to the desired muscle response range within the safe boundary.

2. The closed-loop regulation method for neurorehabilitation based on the synergy of EEG-EMG-functional electrical stimulation according to claim 1, characterized in that, In step S2, the motion intent classification model adopts any one of four algorithms: random forest, support vector machine, linear discriminant analysis, or lightweight neural network. After each algorithm discriminates the input feature vector, it outputs the probability value of each motion intent category. The category with the highest probability is selected as the current candidate motion intent, and the probability value corresponding to the category is used as the confidence level of the current intent.

3. The closed-loop regulation method for neurorehabilitation based on the synergy of EEG-EMG-functional electrical stimulation according to claim 1, characterized in that, In step S2, the stability judgment rule includes: Let the sequence of candidate intent categories output in the most recent 5 time windows be: The non-resting category that appears most frequently is denoted as The number of times it appears is recorded as Ignoring the resting category, count the occurrences of each of the remaining categories and find the non-resting category with the highest frequency. and the number of times it appears ;like ,and If the intention is stable, it is determined to be unstable; otherwise, the data collection continues and electrical stimulation is not triggered. The confidence level judgment rule includes: assuming the intent is stable, further checking the average confidence level of the intent within the stable window. Confidence level of the latest window If both conditions are met, the movement intention is deemed valid. The invalid motor intention is determined by any of the following conditions: the non-resting intention appears less than 3 times in 5 windows; the average confidence level is less than 0.72; the confidence level of the latest window is less than 0.68; more than 2 different non-resting intentions appear in the most recent 5 windows and none of them are dominant; invalid intentions do not trigger any electrical stimulation output.

4. The closed-loop regulation method for neurorehabilitation based on the synergy of EEG-EMG-functional electrical stimulation according to claim 1, characterized in that, In step S3, the determination of the initial stimulation parameters includes: starting with a low intensity of 5 mA for each target channel, gradually increasing the stimulation intensity in 2 mA increments, with a fixed frequency of 30 Hz, a fixed pulse width of 200 μs, and each stimulation level lasting 1 s; and acquiring the sensory threshold current intensity. Motion threshold current intensity and maximum comfort stimulation current intensity ; The initial stimulus intensity is set to The initial pulse width is set to 200-300 μs, and the initial frequency is set to 30-35 Hz.

5. The closed-loop regulation method for neurorehabilitation based on the synergy of EEG-EMG-functional electrical stimulation according to claim 1, characterized in that, In step S3, the criteria for determining valid activation are: According to the method of M-wave detection: the peak amplitude of electromyography in the target muscle group channel is detected within a time period of 5-25 ms after the end of the blanking window. If the peak amplitude exceeds the mean of the resting baseline plus 3 times the standard deviation, the M-wave is determined to be present. Based on the second principle of sustained activation of the electromyographic envelope: For the effective data segment within the 200 ms evaluation window, the normalized mean electromyographic envelope value of the target muscle group channel is calculated. ,like If it is determined to be a valid activation; If it is determined to be weak activation, it is classified as insufficient response; Furthermore, no M-wave was detected, indicating no activation and classifying it as insufficient response.

6. The closed-loop regulation method for neurorehabilitation based on the synergy of EEG-EMG-functional electrical stimulation according to claim 1, characterized in that, In step S4, the muscle response classification after stimulation is evaluated according to a preset evaluation priority order, including: using a rule-based threshold method for judgment, with the judgment performed in the following priority order: Criterion 1: Abnormal enhancement of antagonist muscle: RMS antag RMS target × 0.60, and the relative timing of antagonist muscle activation < 30ms, RMS antag The root mean square value of the antagonistic muscle group, RMS target This represents the root mean square value of the antagonistic muscle group; Judgment 2: Fatigue trend: Furthermore, the median frequency over the three most recent consecutive assessment windows is below 85% of the baseline; This represents the ratio of the median frequency of the electromyographic signal of the target muscle group in the current 200 ms window to the median frequency of the resting baseline data 30 s before the start of training. Criterion 3: Overly strong response: The mean normalized envelope of the target muscle group > 0.8, or the range of motion of the joints observed online exceeds the upper limit of the target range set by the therapist by 120%; Criterion 4: Insufficient response: The mean normalized envelope of the target muscle group is < 0.15, and activation is delayed. > 20 ms, or the target muscle group envelope never exceeds the resting baseline + 3 standard deviations within 200 ms after stimulus output; Judgment 5: Appropriate response: The normalized mean envelope value of the target muscle group is between 0.15 and 0.

80. The activation delay is within the normal range.

7. The method according to claim 1, characterized in that, Step S5 executes the adjustment step size of the stimulation parameters corresponding to the first hit response category with the highest priority, and updates the functional electrical stimulation parameters for the next cycle, including: When the antagonist muscle is abnormally enhanced, the current is reduced by 3 mA and the pulse width is shortened by 25 μs. If the stimulation current intensity and pulse width have reached the lower limit, the lower limit stimulation parameters are maintained and no further reduction is made. If the abnormality persists for two consecutive cycles, the next alternative channel pre-registered by the therapist is switched to, and the initial stimulation parameters or the most recent safe stimulation parameters corresponding to the channel are used to continue stimulation. If the antagonist muscle is abnormally enhanced in all alternative stimulation channels, the stimulation output corresponding to the current target action is stopped, the abnormal status is recorded, and the therapist is prompted to check. When fatigue tends to occur, reduce the frequency by 5 Hz, extend the rest interval by 2 s, and shorten the duration of a single stimulus by 0.5 s. If the stimulation frequency and duration have reached the lower limit and the rest interval has reached the upper limit, keep the boundary parameters unchanged. If fatigue tends to occur after 3 consecutive stimulation cycles, pause the stimulation for 60 s. After the pause, continue training with the reduced stimulation parameters, or wait for the next effective movement intention to be confirmed before resuming stimulation. If the response is too strong, the current will be reduced by 2 mA and the duration of a single stimulus will be shortened by 0.5 s. If the current intensity, stimulation duration and pulse width have all reached the lower limit, and the response is still judged to be too strong in the next stimulation cycle, the stimulation pulse width will be further shortened by 50 μs on the basis of the above adjustments. If the response is insufficient, first increase the stimulation current by 2 mA until it reaches the smaller of the patient's maximum comfortable stimulation current intensity and the upper limit of the safe operating range. Then, increase the pulse width by 50 μs. If the response is still insufficient even after both the stimulation current intensity and the pulse width have reached the upper limit, record the abnormality and prompt the therapist to check the electrode position. When the response is appropriate, all stimulus parameters should remain constant. The stimulation current intensity, pulse width, frequency, duration, and rest interval are limited to 5 mA to I. lim Within the ranges of 50 to 500 μs, 15 to 50 Hz, 1 to 8 s, and 4 to 20 s, I lim Maximum comfort stimulation current intensity for patients Upper limit of individual current during operation And the minimum value in the upper limit of the device current.

8. A closed-loop modulation system for neurorehabilitation based on the synergy of EEG-EMG-functional electrical stimulation, executing the closed-loop modulation method for neurorehabilitation based on the synergy of EEG-EMG-functional electrical stimulation as described in any one of claims 1-7, characterized in that, include: The EEG acquisition module is used to acquire EEG signals from the patient's scalp, perform signal conditioning, and transmit the signals to the main control computing module. The EEG motor intention recognition module communicates with the EEG acquisition module and the main control computing module. It is used to preprocess the raw EEG, extract features and classify the recognition, output the motor intention category and its confidence level, and pass it to the main control computing module for decision-making. The electromyography (EMG) acquisition module communicates with the muscle response assessment module to acquire surface EMG signals of the target muscle group and related muscle groups, perform signal conditioning, and transmit the signals to the main control computing module. The muscle response assessment module communicates with the stimulation parameter adjustment module and is used to assess the activation level, activation sequence, fatigue state, and abnormal co-contraction of antagonistic muscles of the target muscle group based on the electromyographic data output by the electromyographic acquisition module, and output the current muscle response classification result. The functional electrical stimulation module is connected to the main control computing module and is used to generate controllable electrical stimulation pulses according to the stimulation parameter instructions issued by the main control computing module and apply them to the target muscle group through patch electrodes. The stimulation parameter adjustment module is connected in communication with the functional electrical stimulation module. It is used to receive muscle response assessment results, calculate updated stimulation parameters according to the closed-loop adjustment strategy, and write them into the parameter register area of ​​the main control calculation module for use in the next stimulation cycle. The main control computing module is the central hub of the system. It is responsible for receiving EEG and EMG data, running all algorithms, managing stimulation parameters and sending control commands to the electrical stimulation module, and coordinating the timing synchronization of each module. The safety protection module communicates with the functional electrical stimulation module to prevent electrical stimulation from causing harm to the patient at both the hardware and software levels.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the closed-loop regulation method for neurorehabilitation based on the synergy of EEG-EMG-functional electrical stimulation as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the closed-loop regulation method for neurorehabilitation based on the synergy of EEG-EMG-functional electrical stimulation as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Closed loop binaural vagus nerve stimulation system integration and method for neurological rehabilitation

    CN121944383A