Functional electrical stimulation closed-loop modulation method based on muscle activation and LSTM
By combining muscle activation with an LSTM model, functional electrical stimulation parameters can be adjusted in real time, solving the problems of parameter adjustment relying on experience and low patient participation in existing technologies, and achieving personalized closed-loop control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- YANSHAN UNIV
- Filing Date
- 2022-07-20
- Publication Date
- 2026-06-30
AI Technical Summary
Current functional electrical stimulation control methods cannot adjust parameters in real time according to the patient's muscle state. Parameter adjustment relies on experience, patient participation is low, and medical staff need to be involved throughout the process, leading to a shortage of medical staff.
By combining muscle activation with a long short-term memory artificial neural network (LSTM), closed-loop control is achieved by collecting surface electromyography signals and adjusting the frequency, amplitude, and pulse width of functional electrical stimulation in real time.
It enables real-time adjustment of electrical stimulation parameters based on changes in the patient's muscle state, improving patient participation, reducing reliance on medical staff, and providing personalized stimulation strategies.
Smart Images

Figure CN115177864B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a functional electrical stimulation modulation method based on muscle activation analysis and LSTM, and particularly belongs to the fields of biomedical engineering technology and deep learning. Background Technology
[0002] According to the latest data from the China Disease Burden Study, there are over two million stroke patients in my country, making it the country with the highest incidence rate in the world. Stroke patients suffer varying degrees of motor function loss due to damage to brain nerve tissue, requiring long-term muscle and neuromotor rehabilitation training. Functional electrical stimulation (FESPS) has been widely used in stroke rehabilitation due to its advantages in restoring muscle motor function and promoting neural pathway repair.
[0003] Functional electrical stimulation (FES) uses low-frequency electrical currents of a certain intensity to stimulate one or more muscle groups in the human body. By inducing muscle contraction, it simulates normal human movement, thereby improving and restoring the function of the stimulated muscles. The development of FES technology can be traced back to the 1960s. Liberson used a foot switch to control the current to stimulate the muscles innervated by the peroneal nerve of patients, causing dorsiflexion of the ankle joint, successfully correcting gait problems in patients with foot drop.
[0004] Muscle activation refers to the degree of activation of muscles involved in movement during exercise. Muscle strength can be deduced by calculating muscle activation using surface electromyography (EMG) signals, which can be used for neuromuscular control.
[0005] With the rapid development of artificial intelligence, deep learning methods have been widely used in fields such as image recognition, robot control, natural language processing, and bioengineering. Long Short-Term Memory (LSTM) artificial neural networks are a unique type of recurrent neural network (RNN) in deep learning. Traditional RNNs suffer from gradient explosion and vanishing gradient problems during model training, as training time and the number of network layers increase, making them unable to handle long-term data series. LSTM solves these problems. LSTM models excel at processing time-series data, possessing strong long-term learning capabilities. They can continuously learn and optimize their output as the input data set increases, and can also predict outputs through learning. Compared to RNN models, LSTM models add three control gates: the input gate, the output gate, and the forget gate. The structure of the control gates mainly consists of a sigmoid function, with a value between 0 and 1. The dot product operation determines how much information can be transmitted; when the value is 0, no information is transmitted, and when it is 1, all information is transmitted. The following are models of three control gates:
[0006] Memory Gate:
[0007] Input Gate: ,
[0008] Output gate: ,
[0009] In the formula Here, is the sigmoid function, W and b are the parameter matrices to be learned by the model, h is the input data matrix, h is the output data matrix, and tanh is the output activation function.
[0010] Currently, functional electrical stimulation (fEP) is mainly used to treat nerve and muscle dysfunction. Through continuous stimulation, it promotes the repair of motor neural pathways, thereby restoring voluntary motor function. It is now widely used in the rehabilitation of diseases such as stroke, spinal cord injury, and multiple sclerosis. However, some problems remain to be solved in clinical practice. Clinically, current parameters are preset, and medical staff can only adjust the current amplitude based on their experience, resulting in limited parameter adjustments. This open-loop control method cannot effectively adjust parameters according to changes in the patient's muscle state during treatment, leading to low patient participation and requiring full-time medical staff involvement, which exacerbates the shortage of medical personnel. To address the problems of open-loop fEP control methods, such as the inability to adjust parameters in real time according to changes in the patient's muscle state, limited stimulation parameters, and low patient participation, this invention proposes a closed-loop control method for fEP based on muscle activation and LSTM. This method can adjust the fEP parameters in real time according to changes in the patient's muscle activation and can simultaneously adjust the amplitude, pulse width, and frequency of the current, effectively overcoming the shortcomings of open-loop fEP control methods. Summary of the Invention
[0011] This invention addresses the problems in existing open-loop functional electrical stimulation (fEP) control methods, such as the inability to adjust parameters in real time based on the user's muscle state, reliance on experience for parameter adjustment, and low patient participation. It proposes a closed-loop adjustment method for fEP parameters that combines muscle activation with deep learning algorithms, and designs and develops a closed-loop control method for fEP based on muscle activation and LSTM.
[0012] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0013] The functional electrical stimulation closed-loop modulation method based on muscle activation and LSTM specifically includes the following steps:
[0014] Step 1: Obtain the dataset: Use an electromyography (EMG) acquisition device to collect surface EMG signals on the affected side of the patient at rest, at maximum voluntary grip strength, and under functional electrical stimulation conditions, with an interval of 5% of maximum voluntary grip strength.
[0015] Step 2, Data Preprocessing: The original electromyographic signals under functional electrical stimulation conditions have been interfered with, so the template subtraction method is first used to filter out electrical stimulation artifacts, and then 50Hz notch filtering is used to remove power frequency interference and full-wave rectification is performed.
[0016] Step 3: Obtain muscle activation level:
[0017] The muscle activation algorithm used consists of two parts: a neural activation model and a muscle activation model.
[0018] The neural activation model equation is as follows:
[0019] ,
[0020] In the formula Normalized electromyographic signals Electrode time delay : Recursion coefficient;
[0021] Muscle activation model:
[0022] ,
[0023] In the formula, A ranges from [-3, 0]. When A = 0, it represents a linear relationship.
[0024] The preprocessed electromyographic (EMG) data were normalized, with the EMG signal at maximum voluntary contraction force considered as the signal with 100% activation. The normalized data were then... The input is fed into a neural activation model, with an electrode delay of 10ms, to obtain the neural activation intensity. The results are then input into a muscle activation model to obtain muscle activation levels. Where A is -2;
[0025] Step 4, LSTM model training: The muscle activation values obtained in Step 3 are then used for training. And corresponding electrical stimulation parameters, in order to muscle activation Features are used, and electrical stimulation parameters are used as labels to input into the LSTM model. The activation function of the LSTM model is the tanh function, the number of hidden layers is 2, the network node dropout rate of each layer is 0.2, the error is calculated as mean squared error, and the iterative update method of the weight parameters is determined by the RMSprop algorithm. The trained LSTM model automatically outputs functional electrical stimulation parameters based on the input muscle activation. Moreover, the LSTM model has a strong learning ability and continuously learns and optimizes the functional electrical stimulation parameters as the input dataset increases.
[0026] Step 5: Functional electrical stimulation closed-loop control: Using the trained model, the electromyographic signals from the healthy side are collected and input into the data processing module to obtain the parameters of functional electrical stimulation. The electrical stimulation parameters are automatically and in real time adjusted according to the grip strength of the healthy side so that the affected side tracks the grip strength of the healthy side, thus achieving closed-loop control.
[0027] A further improvement of the technical solution of the present invention is that the electromyographic signals collected in step 1 are the surface electromyographic signals of the extensor digitorum, extensor carpi ulnaris, flexor digitorum superficialis and flexor carpi ulnaris on the affected side of the patient.
[0028] A further improvement of the technical solution of the present invention is that: the surface electromyography signal under functional electrical stimulation conditions in step 1 refers to obtaining surface electromyography signals under different parameters by changing the frequency, pulse width, and amplitude of the functional electrical stimulation current. The pulse width is 100us and 200us; the frequency is 0-100Hz with an adjustment interval of 1Hz; and the amplitude is 0-100mA with an adjustment interval of 1mA.
[0029] A further improvement of the technical solution of this invention is as follows: The specific operation of the functional electrical stimulation closed-loop control is as follows: After completing the LSTM model training in step 4, the electromyographic electrodes are attached to the corresponding muscles of the right arm, while the position of the electrical stimulation electrodes at the corresponding muscles of the left arm remains unchanged. When the patient clenches their fist on the healthy side, the electromyographic acquisition device collects the surface electromyographic signals. Through the preprocessing operation in step 2, the active muscle segment is detected, and the electromyographic signal of the active segment is input into the muscle activation model in step 3 to obtain the muscle activation. The muscle activation is then input into the trained LSTM model. The LSTM model outputs three parameters in the electrical stimulation current—frequency, amplitude, and pulse width—based on the input muscle activation characteristics. The functional electrical stimulator receives the parameters and releases the current to stimulate the muscles on the affected side, causing the affected hand to clench its fist, thus making the grip strength of both hands more consistent, thereby achieving closed-loop control of functional electrical stimulation.
[0030] The technological advancements achieved by this invention due to the adoption of the above technical solutions are as follows:
[0031] This invention, based on the real-time analysis of muscle state through muscle activation and the predictive regression capabilities of LSTM models, proposes a closed-loop control method for functional electrical stimulation (fEP) based on muscle activation analysis and LSTM models. This method uses hand grip strength as the final indicator. It collects surface electromyography (EMG) signals from corresponding muscles in the patient's healthy arm in real time, analyzes these signals to determine the activation level of each muscle, and inputs this activation level into an LSTM model to derive fEP parameters. This achieves closed-loop control of fEP by inducing muscle contraction in the affected arm under fEP stimulation, resulting in a clenched fist. The resulting grip strength is nearly identical to that generated by spontaneous contraction of the healthy arm without fEP stimulation, thus completing the closed-loop control of fEP. Furthermore, leveraging the powerful learning capabilities of the LSTM model, the fEP parameters can be continuously optimized as the input dataset increases. This addresses the issues of low patient participation and staff shortages in current open-loop control methods, and provides a new approach to fEP parameter control, enabling personalized stimulation strategies for different users. Attached Figure Description
[0032] Figure 1 This is a flowchart of the present invention;
[0033] Figure 2This is a block diagram illustrating the system principle of this invention;
[0034] Figure 3 This is a diagram of the LSTM model of the present invention. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are some, but not all, embodiments of this invention. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0036] The following description, in conjunction with the accompanying drawings, further elaborates on a functional electrical stimulation closed-loop modulation method based on muscle activation analysis and LSTM according to the present invention.
[0037] like Figure 1-3 As shown, the steps of the functional electrical stimulation closed-loop modulation method combining muscle activation and deep learning in this invention are as follows:
[0038] Step 1: Data Acquisition. The sampling frequency of the electromyography (EMG) acquisition device is 2000 Hz. Before the experiment, the skin surface is wiped with alcohol to increase conductivity and reduce interference. The electrodes of the EMG acquisition device and the functional electrical stimulation (fES) electrodes are attached to the extensor digitorum, extensor carpi ulnaris, flexor digitorum superficialis, and flexor carpi ulnaris muscles on the affected side of the patient. At the start of the experiment, the EMG signal is first acquired during the user's 20-second resting period, followed by the EMG signal during the user's maximum voluntary grip strength for 5 seconds, repeated 5 times. The functional electrical stimulation pulse width is available in two options: 100 μs and 200 μs. The frequency is 0-100 Hz with an adjustment interval of 1 Hz, and the amplitude is 0-100 mA with an adjustment interval of 1 mA. By changing the frequency, pulse width, and amplitude of the functional electrical stimulation current, the grip strength is adjusted at 5% of the maximum voluntary grip strength. Each adjustment is held for 5 seconds, and this is repeated 5 times.
[0039] Step 2, Data Preprocessing: The original electromyographic signals under functional electrical stimulation conditions have been interfered with, so the template subtraction method is used to filter out electrical stimulation artifacts first. After removing the electrical stimulation artifacts, a 50Hz notch filter is used to remove power frequency interference and full-wave rectification is performed.
[0040] Step 3: Obtain muscle activation: Normalize the preprocessed electromyography (EMG) data, using the EMG signal at maximum voluntary contraction force as the signal representing 100% activation. Then, normalize the data... Input into the neural activation model The electrode delay was set to 10ms to obtain the neural activation intensity. And input it into the muscle activation model In the formula, A is taken as -2 to obtain the muscle activation level. ;
[0041] Step 4, LSTM model training: The LSTM model uses the tanh activation function, has 2 hidden layers, a 0.2% dropout rate for each node, and calculates the error using mean squared error. The RMSprop algorithm is used to determine the iterative update method for the weight parameters, and the muscle activation values obtained in Step 3 are then applied. The frequency, amplitude, and pulse width of the corresponding electrical stimulation current are input into the LSTM model, with muscle activation as the characteristic and the electrical stimulation parameters as labels. The trained LSTM model can automatically output the amplitude, frequency, and pulse width of the functional electrical stimulation current based on the input muscle activation.
[0042] Step 5, Functional Electrical Stimulation Closed-Loop Control: After completing the LSTM model training in Step 4, the electromyographic electrodes are attached to the corresponding muscles on the healthy side. The position of the electrical stimulation electrodes remains unchanged. When the patient clenches their fist on the healthy side, the electromyographic acquisition device collects the surface electromyographic signals. Through the preprocessing operation in Step 2, the active muscle segment is detected, and the electromyographic signal of the active segment is input into the muscle activation model in Step 3 to obtain the muscle activation level. The muscle activation level is then input into the trained LSTM model. The LSTM model outputs three parameters in the electrical stimulation current based on the input muscle activation level characteristics: frequency, amplitude, and pulse width. The functional electrical stimulator receives the parameters and releases the current to stimulate the muscles on the affected side, causing the affected hand to clench its fist. The grip strength is fed back to the data center to make the grip strength of both hands tend to be consistent, thus achieving closed-loop control of functional electrical stimulation.
[0043] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A training method for electrical stimulation parameter models based on muscle activation and LSTM, characterized by: Includes the following steps: Step 1: Obtain the dataset: Use an electromyography (EMG) acquisition device to collect surface EMG signals on the affected side of the patient at rest, at maximum voluntary grip strength, and under functional electrical stimulation conditions, with an interval of 5% of maximum voluntary grip strength. Step 2, Data Preprocessing: The original electromyographic signals under functional electrical stimulation conditions have been interfered with, so the template subtraction method is first used to filter out electrical stimulation artifacts, and then 50Hz notch filtering is used to remove power frequency interference and full-wave rectification is performed. Step 3: Obtain muscle activation level: The muscle activation algorithm used consists of two parts: a neural activation model and a muscle activation model. The neural activation model equation is as follows: , In the formula, e(t) is the normalized electromyographic signal, d is the time delay of the electrode, and β1β2 is the recursion coefficient. Muscle activation model: , In the formula, A ranges from [-3, 0]. When A = 0, it represents a linear relationship. The preprocessed electromyographic data were normalized, and the electromyographic signal at the maximum voluntary contraction force was taken as the signal with 100% activation. The normalized data e(t) was input into the neural activation model, and the electrode delay was set to 10ms to obtain the neural activation intensity u(t). This was then input into the muscle activation model to obtain the muscle activation α; where A was set to -2. Step 4: LSTM Model Training: The muscle activation α and corresponding electrical stimulation parameters obtained in Step 3 are input into the LSTM model, with muscle activation α as the feature and electrical stimulation parameters as the label. The activation function of the LSTM model is the tanh function, the number of hidden layers is 2, the network node dropout rate of each layer is 0.2, and the error is calculated using mean squared error. The iterative update method of the weight parameters is determined by the RMSprop algorithm. The trained LSTM model automatically outputs functional electrical stimulation parameters based on the input muscle activation. Furthermore, the LSTM model has a strong learning ability, continuously learning and optimizing the functional electrical stimulation parameters as the input dataset increases.
2. The method for training an electrical stimulation parameter model based on muscle activation and LSTM according to claim 1, characterized in that: The electromyographic signals collected in step 1 are the surface electromyographic signals of the extensor digitorum, extensor carpi ulnaris, flexor digitorum superficialis, and flexor carpi ulnaris muscles on the affected side of the patient.
3. The method for training an electrical stimulation parameter model based on muscle activation and LSTM according to claim 1, characterized in that: In step 1, the surface electromyography (EMG) signal under functional electrical stimulation conditions refers to obtaining EMG signals under different parameters by changing the frequency, pulse width, and amplitude of the functional electrical stimulation current. Specifically, the pulse width is either 100µs or 200µs; the frequency is 0-100Hz with an adjustment interval of 1Hz; and the amplitude is 0-100mA with an adjustment interval of 1mA.