Closed-loop feedback control method for functional electrical stimulation

By adopting a closed-loop feedback control method in functional electrical stimulation, using type 2 fuzzy PID and iterative learning controller to optimize the electrical stimulation parameters, the problem of low control accuracy in the existing technology is solved, and a more efficient rehabilitation training effect is achieved.

CN119896811AActive Publication Date: 2025-04-29NINGXIA UNIVERSITY
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202510085806.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-04-29
Estimated Expiration
2045-01-20

AI Technical Summary

Technical Problem

The prior art provides low control accuracy when performing functional electrical stimulation rehabilitation training for patients with hemiplegia in stroke, and cannot effectively correct errors and interference during exercise.

Method used

The closed-loop feedback control method of functional electrical stimulation is adopted, and the control accuracy of the electrical stimulation is improved by using a 2-type fuzzy PID controller and an iterative learning controller.

Benefits of technology

It significantly improves the control accuracy of functional electrical stimulation of the affected limb, reduces the tracking error of the movement trajectory, and improves the effect of rehabilitation training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119896811A_ABST
    Figure CN119896811A_ABST
Patent Text Reader

Abstract

The invention discloses a closed-loop feedback control method for functional electrical stimulation, and relates to the technical field of biomedical engineering. Determining a target movement track from the actual posture to the expected posture according to the actual posture and the expected posture of the limb on the affected side, and dividing the target movement track into a plurality of nodes; performing iterative optimization on the plurality of nodes, and during the first iteration, performing multiple times of calculation on the initial control parameters of the plurality of nodes through a type 2 fuzzy PID controller to obtain candidate control parameters of the plurality of nodes; starting from the second iteration, substituting the candidate control parameter of the previous iteration and the error of the historical node of the current iteration into a type 2 fuzzy iteration learning controller to obtain the candidate control parameter of the current node of the current iteration until the iteration is completed; the candidate control parameters are used for performing functional electrical stimulation on the limb on the affected side. According to the method, the control precision of functional electrical stimulation of the limb on the affected side can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of biomedical engineering, and in particular to a closed-loop feedback control method of functional electrical stimulation. Background Art

[0002] Some stroke patients experience hemiplegia after the onset of the disease, which is manifested by muscle weakness, abnormal muscle tone and motor dysfunction of the paralyzed limb muscles. In response to this situation, the engineering field uses functional electrical stimulation (FES) as a common method of rehabilitation training to promote the recovery and functional improvement of affected muscles.

[0003] In the prior art, when performing functional rehabilitation training on hemiplegic stroke patients, a controller is usually used to perform functional electrical stimulation on the affected limb according to pre-set instructions or programs. However, the control accuracy of this method mainly relies on manual adjustment of electrical stimulation parameters according to treatment needs, and it is unable to correct errors and interferences during the movement process, resulting in low control accuracy of functional electrical stimulation of the affected limb. Summary of the invention

[0004] Based on this, it is necessary to provide a closed-loop feedback control method for functional electrical stimulation to address the above-mentioned technical problems, which can improve the control accuracy of functional electrical stimulation of the affected limb.

[0005] The present invention adopts the following technical solutions:

[0006] The present invention provides a closed-loop feedback control method for functional electrical stimulation, comprising:

[0007] According to the actual posture and the expected posture of the affected limb, a target motion trajectory from the actual posture to the expected posture is determined, and the target motion trajectory is divided into a plurality of nodes;

[0008] Iterative optimization is performed on multiple nodes. In the first iteration, the initial control parameters of multiple nodes are calculated multiple times by using a type 2 fuzzy PID controller to obtain candidate control parameters of multiple nodes, and functional electrical stimulation is performed on the affected limb by using the candidate control parameters.

[0009] Starting from the second iteration, the error of the current node is determined according to the actual posture and the expected posture of the current node, and the learning rate gain of the type 2 fuzzy iterative learning controller is updated according to the error of the current node;

[0010] The candidate control parameters of the previous iteration and the errors of the historical nodes of the current iteration are substituted into the type 2 fuzzy iterative learning controller to obtain the candidate control parameters of the current node of the current iteration until the iteration is completed; the candidate control parameters are used for functional electrical stimulation of the affected limb.

[0011] Preferably, updating the learning rate gain of the type 2 fuzzy iterative learning controller according to the error of the current node includes:

[0012] According to the error of the current node and the error of the previous node, determine the error change rate of the current node;

[0013] Perform type 2 fuzzy inference on the error change rate and error to obtain the learning rate gain of the current node.

[0014] Preferably, type 2 fuzzy reasoning is performed on the error change rate and the error to obtain the learning rate gain of the current node, including:

[0015] According to the preset domain and membership function, the error change rate and the error are fuzzified to obtain the membership of the error change rate and the membership of the error;

[0016] Based on the fuzzy rule table, the expected value of the learning rate gain is determined according to the membership of the error change rate and the membership of the error;

[0017] The expected value of the learning rate gain is converted into the actual value of the learning rate gain according to the interval mapping formula.

[0018] Preferably, the control formula of the type 2 fuzzy iterative learning controller is:

[0019] u[i+1,n]=u[i,n]+K p [n]{e[n]-e[n-1]}+K i [n]e[n]+K d [n]{e[n]-2e[n-1]+e[n-2]};

[0020] Wherein, u[i+1,n] is the candidate control parameter of the nth node at the i+1th iteration, and u[i,n] is the candidate control parameter of the nth node at the i-th iteration; K p [n], K i [n] and K d [n] is the learning rate gain of the nth node on the trajectory.

[0021] Preferably, the process of acquiring the actual posture and the expected posture of the affected limb includes:

[0022] The torque is collected by an inertial measurement unit worn on the healthy limb, and the torque of the healthy limb is determined as the expected posture of the affected limb, and the actual posture is collected by the inertial measurement unit worn on the affected limb.

[0023] The present invention provides a closed-loop feedback control device for functional electrical stimulation, comprising:

[0024] A determination module, used for determining a target motion trajectory from the actual posture to the expected posture according to the actual posture and the expected posture of the affected limb, and dividing the target motion trajectory into a plurality of nodes;

[0025] The first iteration module is used for iterative optimization of multiple nodes. In the first iteration, the initial control parameters of multiple nodes are calculated multiple times by the type 2 fuzzy PID controller to obtain candidate control parameters of the multiple nodes, and functional electrical stimulation is performed on the affected limb by the candidate control parameters.

[0026] An updating module is used to determine the error of the current node according to the actual posture and the expected posture of the current node starting from the second iteration, and to update the learning rate gain of the type 2 fuzzy iterative learning controller according to the error of the current node;

[0027] The second iteration module is used to substitute the candidate control parameters of the previous iteration and the errors of the historical nodes in the current iteration into the type 2 fuzzy iterative learning controller to obtain the candidate control parameters of the current node in the current iteration until the iteration is completed; the candidate control parameters are used to perform functional electrical stimulation on the affected limb.

[0028] The present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor of an STM32 or other microcontroller, the closed-loop feedback control method of functional electrical stimulation is implemented.

[0029] The present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor is a processor of STM32 or other microcontrollers. When the processor executes the program, the closed-loop feedback control method of functional electrical stimulation is implemented.

[0030] At least one of the above technical solutions adopted by the present invention can achieve the following beneficial effects:

[0031] In the present invention, when functional stimulation is performed on the affected limb, in the initial stage of iteration, a type 2 fuzzy PID controller with a faster response speed is used, so that functional electrical stimulation of the affected limb through candidate control parameters can make the actual motion trajectory of the affected limb quickly approach the target motion trajectory, significantly reducing the iterative learning of historical control experience, and then in the subsequent iteration process, a type 2 fuzzy iterative learning controller is used to update the candidate control parameters of the current node in the current iteration through the candidate control parameters in the previous iteration and the errors of the historical nodes in the current iteration, which is equivalent to gradually improving the tracking accuracy of the motion trajectory of the affected limb to the target motion trajectory by learning the historical control experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0033] Figure 1 A block diagram of an application of a type 2 fuzzy PILC-SO closed-loop feedback control algorithm provided by the present invention;

[0034] Figure 2 A schematic flow chart of a closed-loop feedback control method for functional electrical stimulation provided by the present invention;

[0035] Figure 3 A simulation flow chart of a type 2 fuzzy PID control algorithm provided by the present invention;

[0036] Figure 4 A schematic diagram of an interval type 2 triangular membership function provided by the present invention;

[0037] Figure 5 A simulation flow chart of a type 2 fuzzy ILC algorithm provided by the present invention;

[0038] Figure 6 A schematic diagram of a type 2 fuzzy PILC-SO closed-loop feedback FES control strategy provided by the present invention;

[0039] Figure 7 A simulation flow chart of a type 2 fuzzy PILC-SO algorithm provided by the present invention;

[0040] Figure 8 A schematic diagram of simulation results of a type 2 fuzzy PILC-SO algorithm provided by the present invention;

[0041] Fig. 9 A schematic diagram of simulation results of another type 2 fuzzy PILC-SO algorithm provided by the present invention;

[0042] Fig.10A schematic diagram of wrist extension trajectory of a healthy subject simulating wrist extension dysfunction provided by the present invention;

[0043] Fig.11 A schematic diagram of the statistical results of the PPMCC coefficients for limb movement trajectory reconstruction under different FES application modes provided by the present invention;

[0044] Fig.12 A schematic diagram of the change trend of the PPMCC coefficients of the actual and target functional motion trajectories under the three FES functional modes provided by the present invention;

[0045] Fig.13 A schematic diagram of a closed-loop feedback control device for functional electrical stimulation provided by the present invention;

[0046] Fig.14 A schematic diagram of a computer device for implementing a closed-loop feedback control method for functional electrical stimulation provided by the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0048] When stroke hemiplegic patients use the existing open-loop or closed-loop FES system for functional rehabilitation training, there are generally problems such as low movement completion, unstable and incoherent limb movement, which seriously restricts the limb function recovery effect of patients during the golden period of rehabilitation training.

[0049] Open-loop FES has significant limitations in promoting movement of paralyzed limbs, mainly manifested in the inability to correct errors and interferences during movement, resulting in low movement completion. In addition, open-loop FES also faces challenges such as electrode placement, muscle fatigue, changes in body posture, time-varying characteristics of muscle dynamics, and external interference. These factors together affect the ability of paralyzed limbs to perform stable and smooth functional training movements, thereby limiting their rehabilitation effects.

[0050] In order to overcome the limitations of open-loop control, closed-loop control FES came into being. By introducing a feedback controller, the closed-loop system monitors muscle reactions or limb movement states in real time, thereby more effectively suppressing position deviations, changes in muscle reactions, and fatigue. Based on this feedback information, the system can dynamically adjust the electrical stimulation parameters to ensure that the amount of charge is accurately applied to the target muscle. This personalized and precise stimulation strategy enables the paralyzed limbs to stably and smoothly perform functional movements that match the expected motion trajectory, significantly improving the rehabilitation effect. However, the design and implementation of closed-loop FES systems also face many challenges, especially the tracking control of joint angles. Due to the nonlinearity of the musculoskeletal system and the delayed effect of the electrical stimulation response, it is particularly difficult to achieve precise control.

[0051] In the design of closed-loop feedback FES control strategy, controller and model are two core elements. Depending on whether the muscle electrical stimulation response model is used to evaluate the effectiveness of the controller, the closed-loop feedback FES control strategy is divided into two categories: model-free control and model-based control. Model-free control relies on real-time muscle signals or predicted responses to adjust parameters. It has strong adaptability and the ability to handle complex nonlinear relationships, but it has high data dependence, large computing resource requirements, and insufficient model interpretability. Model-based control can provide accurate prediction and control when the model is accurate. It has strong adaptability and a variety of controller options, but the model construction is complex, susceptible to interference, and has a large amount of calculation.

[0052] Closed-loop feedback control is an intelligent dynamic strategy that uses real-time acquisition of the movement or muscle response of the paralyzed limb as feedback to adjust the electrical stimulation parameters to achieve precise stimulation. This strategy uses sensors to monitor parameters such as muscle activity and joint position, and dynamically adjusts the stimulation signal accordingly to ensure more accurate limb movement control. In closed-loop FES, the key is to use a suitable controller to generate electrical stimulation with a precise amount of charge to ensure high-quality rehabilitation training for the paralyzed limb. Ultimately, both model-free closed-loop feedback and model-based closed-loop feedback control algorithms will be deployed in embedded rehabilitation training systems to assist limb paralysis patients in performing rehabilitation training tasks and promote functional recovery of paralyzed limbs. Model-based closed-loop feedback control algorithms can test their control performance through pre-built muscle response models. Compared with model-free closed-loop feedback control algorithms, the latter are less reliable due to their high reliance on data, large computing resources, and insufficient model interpretability. Therefore, model-based closed-loop feedback control algorithms are more reliable.

[0053] Iterative learning control (ILC) is a closed-loop feedback control algorithm that is more suitable for combination with FES technology. It can use the repeatability of rehabilitation training tasks to update the control signal, reduce tracking errors and improve tracking accuracy. However, the ILC control algorithm also has challenges such as dealing with nonlinear systems and non-repetitive interference, learning rate selection and real-time performance. To this end, researchers have proposed methods such as estimation-based multi-model ILC and PID-type ILC combined with adaptive network fuzzy inference system to address these challenges. However, the closed-loop feedback control algorithm based on ILC still has problems such as long number of iterations, poor real-time performance, unstable learning rate selection and control performance.

[0054] In summary, the existing technologies in this field have the following defects: the existing model-free closed-loop feedback FES control algorithms do not rely on pre-built models, so there may be limitations in dealing with physiological characteristics such as nonlinearity and fatigue of muscle responses, which may lead to inaccurate adjustment of electrical stimulation parameters and affect the rehabilitation effect. In addition, the performance of these algorithms is highly dependent on the quality and stability of the feedback signal, and any noise or interference in the signal may affect the accuracy of control. Finally, due to the lack of in-depth understanding of the physiological characteristics of muscles, these algorithms may not be able to achieve the optimal stimulation strategy, thereby limiting the further improvement of rehabilitation effects.

[0055] Based on this, the present invention provides a closed-loop feedback control method for functional electrical stimulation, through a closed-loop feedback FES control strategy based on type-2 fuzzy PID and ILC synergistically optimized control algorithmcombining type-2fuzzy PID and ILC, PILC-SO, firstly using a type-2 fuzzy PID control algorithm to make the actual motion trajectory of the affected limb output quickly approach the target motion trajectory, significantly reducing the iterative learning history control experience of the present invention, and then using a type-2 fuzzy ILC with a PID-type learning rate gain to compensate for external interference and nonlinear changes in the muscle system, ensuring that the motion trajectory of the controlled object is smooth and stable, and based on the last control experience, continuously improving tracking accuracy and reducing trajectory errors. The present invention proposes a model-based closed-loop feedback control algorithm, which combines interval type-2 fuzzy logic reasoning PID and ILC, can effectively compensate for interference and muscle time-varying uncertainty in the rehabilitation training process, and enhance the control accuracy of the controlled object through iterative learning history experience.

[0056] The technical solutions provided by various embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0057] The main purpose of this invention is to develop and deploy a closed-loop feedback-based FES control algorithm to the designed FES prototype system to assist paralyzed patients in reconstructing smooth, stable, and coherent rehabilitation training movements. The system calculates the motion trajectory error between the controlled limb and the healthy limb in real time, and uses the controller algorithm to dynamically adjust the output electrical stimulation intensity, so as to achieve a stable and smooth motion trajectory of the controlled limb, and match it with the healthy limb as much as possible.

[0058] In an exemplary embodiment, a closed-loop feedback functional electrical stimulation (FES) control strategy type 2 fuzzy PILC-SO for reconstructing the motor function of hemiplegic limbs after stroke is provided. Figure 1 As shown, the stimulation frequency, pulse width or current intensity of functional electrical stimulation FES is determined by electromyographic signal regulation, and then functional electrical stimulation FES is performed on the muscle response model / human skeletal muscle system (affected limb) to collect the angle / torque N of the affected limb act , and closed-loop feedback to the Type 2 fuzzy PILC-SO controller. The Type 2 fuzzy PILC-SO controller is based on the angle / torque N ref and angle / torque N act The control strategy can be applied to FES mode regulated by electromyographic signals (i.e. electromyographically controlled FES, as shown in the dotted box in the figure), or to FES applications that rely only on kinematic sensor feedback.

[0059] In an exemplary embodiment, Figure 2 As shown, Figure 2 The following is a flow chart of a closed-loop feedback control method for functional electrical stimulation in the present invention, which specifically includes the following steps:

[0060] S201, determining a target motion trajectory from the actual posture to the expected posture according to the actual posture and the expected posture of the affected limb, and dividing the target motion trajectory into a plurality of nodes.

[0061] The posture may be information such as torque or angle.

[0062] Optionally, the process of acquiring the actual posture and expected posture of the affected limb includes: collecting torque through an inertial measurement unit (IMU) worn on the healthy limb, and determining the torque of the healthy limb as the expected posture of the affected limb, and collecting the actual posture through the inertial measurement unit worn on the affected limb.

[0063] According to the actual posture and the expected posture of the affected limb, a target motion trajectory from the actual posture to the expected posture is determined, and the target motion trajectory is divided into a plurality of nodes. For example, the target motion trajectory is divided into 300 nodes.

[0064] S202, iteratively optimizing multiple nodes. In the first iteration, the initial control parameters of the multiple nodes are calculated multiple times by using a type 2 fuzzy PID controller to obtain candidate control parameters of the multiple nodes, and functional electrical stimulation is performed on the affected limb by using the candidate control parameters.

[0065] The control parameter may be the stimulation frequency, pulse width or current intensity acting on the affected limb.

[0066] The present invention aims to integrate the PID algorithm into the self-developed embedded rehabilitation training system, so a type 2 fuzzy PID controller is used. In view of the fact that the target torque is the real-time changing angle of the healthy limb of the patient, the position PID control is not applicable due to the accumulation of integral errors. On the contrary, the incremental PID control only considers the instantaneous change of the control quantity and is more suitable for dynamic target values. Therefore, the incremental PID control is selected in the type 2 fuzzy PID controller of the present invention to ensure that the system accurately tracks the target torque of the patient's rehabilitation training.

[0067] The control quantity of incremental PID control at time n-1 is:

[0068]

[0069] Among them, u[n-1] represents the control parameter corresponding to time n-1, e[n-1] is the error between the target torque and the actual posture at time n-1, e[n-2] is the error between the target torque and the actual posture at time n-2, T is the sampling period, T i is the integration time constant, T d is the differential time constant, K p is the learning rate gain in the Type 2 fuzzy PID controller.

[0070] Assume Δu[n]=u[n]-u[n-1], we get:

[0071]

[0072] make is the integration coefficient; is the differential coefficient, the above formula is simplified to:

[0073] Δu[n]=K p {e[n]-e[n-1]}+K i e[n]+K d {e[n]-2e[n-1]+e[n-2]} (3)

[0074] Where Δu[n] is the output of the type 2 fuzzy PID controller, K p , K i and K d is the learning rate gain in the Type 2 fuzzy PID controller.

[0075] It should be noted that each node can be calculated multiple times. For any node, the error of the node can be determined based on the initial control parameters of the node, and Δu[n] can be determined based on the errors e[n], e[n-1] and e[n-2] of the first three nodes of the node. Then, the sum of the output Δu[n] of the type 2 fuzzy PID controller and the control parameter u of the previous node is determined as the candidate control parameter. Finally, the affected limb is functionally electrically stimulated by the candidate control parameter. The n in formula (3) represents the nth node.

[0076] like Figure 3 As shown, Figure 3 This is the simulation flow chart of the type 2 fuzzy PID control algorithm. The FuzzyPIDcontroller function performs fuzzy logic reasoning and PID calculation M times. The FuzzyPIDcontroller function is responsible for performing type 2 fuzzy logic reasoning and PID calculation to obtain the increment Δu[n], and updates the candidate control parameter u of the current node according to the increment u[n] and the candidate control parameter u of the previous node. The TransferFunction function is responsible for applying the candidate control parameter u of the current node to the affected limb to obtain the actual posture. The transfer function of electrical stimulation parameters and muscle response is used as the controlled model, and the target torque is set to 0.8 (normalized). The PID controller parameter K p and K i The range of K is limited to [-0.5, 0.5], d The range of is [-0.01, 0.01]. This design aims to use the type 2 fuzzy logic system to achieve adaptive adjustment of electrical stimulation parameters in the embedded rehabilitation training system to meet the expected torque output requirements.

[0077] The Type 2 fuzzy PID used in the present invention has the advantages over the PID used in the control method in the prior art in that it has a stronger modeling ability and can simultaneously handle intra-individual and inter-individual uncertainties; the control effect is better, especially the control surface near the steady state is smoother, which helps to improve robustness and suppress oscillations; it has a wider adaptability and can adapt to complex nonlinear systems and automatically adjust control parameters to cope with system changes and external disturbances; and it combines the advantages of fuzzy control and PID control and can maintain good control performance in the face of system parameter changes and external disturbances.

[0078] S203, starting from the second iteration, the error of the current node is determined according to the actual posture and the expected posture of the current node, and the learning rate gain of the type 2 fuzzy iterative learning controller is updated according to the error of the current node.

[0079] After obtaining the candidate control parameters for each node, functional electrical stimulation can be performed on the affected limb at each node using the candidate control parameters, the actual posture of the affected limb at the corresponding node can be collected, and then the error of the corresponding node can be determined based on the actual posture and target torque of the corresponding node.

[0080] In an exemplary embodiment, the learning rate gain of the type 2 fuzzy iterative learning controller is updated according to the error of the current node, including: determining the error change rate of the current node according to the error of the current node and the error of the previous node; performing type 2 fuzzy reasoning on the error change rate and the error to obtain the learning rate gain of the current node.

[0081] The ratio of the difference between the error of the current node and the error of the previous node to the time difference between two adjacent nodes is determined as the error change rate of the current node.

[0082] Optionally, type 2 fuzzy reasoning is performed on the error change rate and the error to obtain the learning rate gain of the current node, including: fuzzifying the error change rate and the error according to a preset domain and membership function to obtain the membership of the error change rate and the membership of the error; based on a fuzzy rule table, determining the expected value of the learning rate gain according to the membership of the error change rate and the membership of the error; and converting the expected value of the learning rate gain into an actual value of the learning rate gain according to an interval mapping formula.

[0083] In the present invention, type 2 fuzzy logic reasoning plays a key role, which is based on the target torque y 目标 and the actual posture y 实际 The error e and the error change rate de / dt dynamically adjust the learning rate gain of the PID or iterative learning ILC controller. Since the ILC controller uses a PID type learning rate, the output of type 2 fuzzy logic reasoning covers three learning rate gains K p , K i and K d , thereby realizing adaptive tuning of controller parameters and improving the flexibility and performance of the control system.

[0084] Type 2 fuzzy logic reasoning includes three parts: fuzzification, fuzzy reasoning and defuzzification. The specific process is as follows:

[0085] Firstly, according to the preset domain and membership function, the error change rate and the error are fuzzified to obtain the membership of the error change rate and the membership of the error, including: mapping the error change rate and the error to a unified preset domain to obtain the unified parameters of the error change rate and the error, using an interval type 2 triangular membership function to describe the fuzzy characteristics of the error change rate and the unified parameters of the error, and obtaining the membership of the error change rate and the membership of the error.

[0086] Specifically, in order to realize fuzzy processing, the present invention first determines the domain and membership function. Given the input variable e and its change rate de / dt, and the output variable K p , K i and K d The numerical ranges of are different. The present invention maps the actual values ​​to a unified domain for subsequent processing and analysis. In the present invention, the domain is set to [-3, 3] and is evenly divided into six intervals: [-3, -2], [-2, -1], [-1, 0], [0, 1], [1, 2] and [2, 3]. These intervals correspond to the fuzzy sets NB (negative large), NM (negative medium), NS (negative small), ZO (zero), PS (positive small), PM (positive medium) and PB (positive large). For example, when the range of the input e is [-80, 80] and the value of e is 40, the value obtained by mapping is 1.5, which is located in the interval [1, 2], indicating that the point is between positive small (PS) and positive medium (PM). This mapping method helps to convert specific numerical values ​​into fuzzy semantics that can be processed by the fuzzy logic system, thereby realizing adaptive adjustment of the control system parameters, as shown in formula (4), which is the calculation formula of the unified parameters of the error e.

[0087]

[0088] Among them, E is the unified parameter of error, E max is the maximum value of the domain 3, E min is the minimum value of the domain -3, M is the maximum value of the actual value of the error e 80, and N is the minimum value of the actual value of the error e -80. It should be noted that the calculation principle of the unified parameter of the error change rate is the same as the calculation principle of the unified parameter of the error, and this embodiment will not be repeated here.

[0089] The present invention adopts interval type 2 triangular membership function to describe the fuzzy characteristics of input variables, such as Figure 4 As shown in the figure, this membership function includes an upper membership function (in red) and a lower membership function (in blue), and its graphical form is shown in the figure. When the input variable e is 1.5 after mapping, this value belongs to both the fuzzy sets PM (positive middle) and PS (positive small). In this case, the upper membership μ corresponding to the e value is 1(1.5) and the lower membership μ 2 (1.5) are equal, both are 0.375. The design of this membership function allows the present invention to capture the uncertainty of the input variables in a more flexible and accurate way, thereby providing richer information for fuzzy logic reasoning.

[0090] Fuzzy reasoning: The fuzzy reasoning process involves determining the magnitude of the output variable by looking up a table based on the membership of the input variable e and its rate of change de / dt. When the input variable e is 40 and its rate of change de / dt is -10, the present invention maps these values ​​to a predetermined domain by fuzzification. The mapping value of e, 1.5, has a membership of 0.375 and belongs to the fuzzy sets PS (positive small) and PM (positive middle); the mapping value of de / dt, -1, has a membership of 0.75 and belongs to the fuzzy set NS (negative small). Using these membership values, the present invention queries the fuzzy rule table to determine the fuzzy state of the output variable.

[0091] Defuzzification: In the fuzzification process, the values ​​of ZO (zero), NS (negative small) and PS (positive small) are set to 0, -1 and 1 respectively. Through the membership calculation, K is obtained. p , K i and K d The expected values ​​are E(K p )=-0.2815、E(K i )=0.2815 and E(K d )=0.2815. Considering K p , K i The actual value range of is [-0.5, 0.5], and K d The actual value range of K is [-0.01, 0.01]. The present invention uses the interval mapping formula to convert the expected value into the actual value. p The actual value is about -0.047, K i The actual value is about 0.047, K d The actual value of is about 0.0009. This conversion process ensures that the results of fuzzy logic reasoning can be effectively applied to the parameter adjustment of the actual control system.

[0092] For example, when the input e is 40 and de / dt is -10, and the range of e is [-80, 80] and the range of de / dt is [-30, 30], through the fuzzification of formula (4), the mapping value of e is 1.5, the membership is 0.375 (PS) and 0.375 (PM), and the mapping value of de / dt is -1, and the membership is 0.75 (NS).

[0093] When defuzzifying, the values ​​of ZO (zero), NS (negative small) and PS (positive small) are set to 0, -1 and 1 respectively.p Rule table, when the membership of e is 0.375 (PS) and the membership of de / dt is 0.75 (NS), ΔK p1 is ZO; when the membership of e is 0.375 (PM) and the membership of de / dt is 0.75 (NS), ΔK p2 is NS, therefore, E(K p ) is calculated as: E(K p )=ΔK p1 ×ZO+ΔK p2 ×NS=ΔK p1 ×0-1×ΔK p2 =-ΔK p2 =-0.375×0.75=-0.2815. It should be noted that E(K i ) and E(K d ) is calculated in the same way as E(K p ) is similar, and this embodiment will not be described in detail here.

[0094] Table 1

[0095]

[0096] S204, substitute the candidate control parameters of the previous iteration and the errors of the historical nodes in the current iteration into the type 2 fuzzy iterative learning controller to obtain the candidate control parameters of the current node in the current iteration until the iteration is completed; the candidate control parameters are used to perform functional electrical stimulation on the affected limb.

[0097] Optionally, the control formula of the type 2 fuzzy iterative learning controller is:

[0098] u[i+1,n]=u[i,n]+K p [n]{e[n]-e[n-1]}+K i [n]e[n]+K d [n]{e[n]-2e[n-1]+e[n-2]} (5)

[0099] Wherein, u[i+1,n] is the candidate control parameter of the nth node at the i+1th iteration, and u[i,n] is the candidate control parameter of the nth node at the i-th iteration; K p [n],K i [n] and K d [n] is the learning rate gain of the nth node on the trajectory.

[0100] The type 2 fuzzy ILC algorithm used in the present invention controls the affected limb. The simulation process of the algorithm is as follows: Figure 5As shown in the figure, the FuzzyILCcontroller function is responsible for performing type 2 fuzzy logic reasoning and ILC calculation. The function receives the error e(n) between the actual output of node n and the target value as an input parameter. First, based on the current error e(n) and the error of the previous node e(n-1), the rate of change of the error is calculated. Then, using e(n) and Perform type 2 fuzzy inference to determine the learning rate gain K of node n in the i-th iteration p [n],K i [n] and K d [n]. Finally, according to formula (5), the candidate control parameters u[i+1, n] of the controller output of the i+1th iteration are calculated. The TransferFunction function is responsible for applying the output of the type 2 fuzzy ILC controller to the affected limb to obtain the actual posture and calculate the error e(n) between the actual posture and the target torque of the corresponding node.

[0101] In an exemplary embodiment, the algorithm control performance test is performed using a mathematical relationship model of the controlled object constructed using electrical stimulation parameters (including pulse width and stimulation frequency) derived from human experiments and corresponding muscle response data. In the modeling process, the original experimental data is first normalized to eliminate dimensional differences. The nonlinear least squares method is then used to accurately fit the data to construct a mathematical model that can accurately capture and describe the nonlinear relationship between electrical stimulation parameters and muscle response.

[0102] T=aW b +cF d (6)

[0103] Among them, T, W, and F represent the normalized wrist torque, pulse width, and stimulation frequency, respectively. A, b, c, and d are model parameters (a = 0.7503, b = 1, c = 0.2154, d = 1). Based on the in-depth analysis and experimental verification of wrist extension movements, it is ensured that the transfer function model can accurately reflect the response behavior of the wrist muscles when performing extension movements.

[0104] For the type 2 fuzzy PILC-SO closed-loop feedback FES control strategy, as Figure 6 , control signal y 目标 (target posture) comes from the inertial measurement unit IMU1 worn by the patient's healthy limb, and the feedback signal y 实际The (actual posture) is provided by the inertial measurement unit IMU2 on the affected limb. These two sets of data are input into the type 2 fuzzy logic inference system and PID / ILC controller for processing and calculation to generate the control output u(t). The output u(t) dynamically adjusts the stimulation intensity through the electrical stimulation parameters (modulated pulse width), thereby achieving precise adjustment of the movement angle of the affected limb.

[0105] In the Matlab simulation environment, the present invention sets the normalized torque as the desired target trajectory. In order to achieve precise control, the target trajectory is decomposed into 300 nodes for iterative learning. During the simulation process, the present invention sets the value range of the proportional gain kp and the integral gain ki to [-0.5, 0.5], and the value range of the differential gain kd to [-0.01, 0.01]. The setting of these parameters is intended to ensure the stability and performance optimization of the control system.

[0106] The control algorithm of type 2 fuzzy PILC-SO proposed in the present invention is as follows: Figure 7 As shown. When tracking the target trajectory for the first time, the type 2 fuzzy PID control algorithm with faster response speed is used to significantly reduce the initial iteration time and the number of iterative learning, and improve the real-time performance of the control algorithm. Then, on this basis, the type 2 fuzzy ILC algorithm is used to continuously reduce the maximum trajectory error and the root mean square error (RMSE) value by learning historical control experience, as shown in Figure 8 and Fig. 9 As shown; among them, Figure 8 Figures (a) and (b) in the figure respectively show the comparison diagrams of the actual trajectory and the target trajectory Target using the type-2 fuzzy ILC algorithm and the type-2 fuzzy iterative PILC-SO optimization control algorithm in the first iteration ILC1 to the 13th iteration ILC13, as well as the corresponding diagram of the maximum trajectory error after 13 iterations.

[0107] The present invention implements a type 2 fuzzy PID algorithm and a control algorithm based on the collaborative optimization of type 2 fuzzy PID and ILC on a hardware platform for different FES application modes. Specifically, the type 2 fuzzy PID algorithm is applied to the contralaterally controlled FES (CCFES) mode to achieve high-precision control based on real-time feedback; while the control algorithm based on the collaborative optimization of type 2 fuzzy PID and ILC is applied to the trajectory tracking FES (TTFES) mode, aiming to improve the accuracy of trajectory tracking through an iterative learning mechanism. The hardware implementations of these two algorithms both use the FreeRTOS real-time operating system, which uses its task management function to ensure the efficient execution of the algorithm and the rational allocation of system resources.

[0108] The present invention implements the deployment of type 2 fuzzy PID control algorithm on a self-developed hardware system to support the CCFES mode. The hardware deployment of the algorithm is managed by the FreeRTOS real-time operating system, specifically including type 2 fuzzy PID task (FuzzyPID_task), obtain IMU1 angle task (Imu1_task), obtain IMU2 angle task (Imu2_task) and set pulse width task (SetWidth_task). These tasks are synchronized by binary semaphores (BinarySemaphore_FuzzyPID, BinarySemaphore_IMU1, BinarySemaphore_IMU2, BinarySemaphore_SetWidth) and triggered by software timers (Timer2, Timer3, Timer4).

[0109] Based on the hardware deployment of the Type 2 fuzzy PID control algorithm, the present invention further realizes the deployment of the Type 2 fuzzy PID and ILC collaborative optimization control algorithm. Specifically, in the original task and timer architecture, a Type 2 fuzzy ILC control algorithm task (FuzzyILCTask) and a timer (Timer6) are added. Timer6 triggers FuzzyILCTask with a period of 100ms. This task not only executes the Type 2 fuzzy ILC algorithm, but is also responsible for the entry and storage of trajectory data.

[0110] In the experiment, six subjects were randomly paired, one of whom served as a controller and the other as a controlled patient who wore a blindfold to simulate wrist extension dysfunction. The subject sat on a chair with his left forearm placed naturally on the table, ensuring that the elbow, wrist and hand were relaxed. The controller's back of the hand was equipped with an inertial measurement unit (IMU1) to set the target wrist extension angle, while a 4×4 cm hydrogel electrode was placed on the skin surface of the forearm muscle of the controlled patient, and another inertial measurement unit (IMU2) was placed on the back of the hand to capture the actual wrist extension angle induced by electrical stimulation in real time. The experiment included recording of wrist extension motion trajectory and testing of three different FES functional modes to evaluate the performance of ordinary FES, CCFES based on type 2 fuzzy PID control, and TTFES combined with type 2 fuzzy PILC control in reconstructing paralyzed limb function. The actual motion trajectory y of the controlled person in the CCFES based on type 2 fuzzy PID control and the TTFES based on type 2 fuzzy PILC-SO control modes was y. 实际 More closely fits the target motion trajectory preset by the controller 目标 , showing higher tracking accuracy and consistency, such as Fig.10 As shown, Fig.10To simulate the wrist extension trajectories of healthy subjects with wrist extension dysfunction under three electrical stimulation control strategies.

[0111] The Pearson product-moment correlation coefficient (PPMCC) is used to quantify the correlation between the target and the actual motion trajectory, and its mean and standard deviation are calculated, as shown in Fig.11 The PPMCC coefficients of the reconstruction of limb motion trajectories under different FES application modes are shown in the figure. * indicates significant differences, p<0.05. The correlation coefficients between the actual limb motion trajectories and the target motion trajectories of the subjects under type 2 fuzzy PID and type 2 fuzzy PILC-SO control were significantly higher than those under ordinary FES control (p<0.05). Specifically, the mean correlation coefficient under type 2 fuzzy PID algorithm control was 0.75±0.08; while under type 2 fuzzy PILC-SO control, the mean correlation coefficient was 0.77±0.05.

[0112] The present invention analyzes the PPMCC mean trend between the wrist extension movement trajectory and the target trajectory of 6 subjects simulating hemiplegic patients with wrist extension dysfunction who performed 5 wrist extension movements under electrical stimulation, such as Fig.12 As shown, Fig.12 The PPMCC coefficients of the actual and target functional motion trajectories in the three FES functional modes are shown in the figure. It can be observed that in the ordinary FES control mode, when the "affected" limb completes 5 wrist extension movements, the correlation coefficient of the motion trajectory is about 0.6, and there is no obvious regularity in the change. In the CCFES control mode based on type 2 fuzzy PID control, the correlation coefficient remains at about 0.75 after experiencing initial fluctuations. In the TTFES mode based on type 2 fuzzy PILC-SO control, the correlation coefficient is relatively stable, with a high value of about 0.77, and shows an upward trend. This shows that compared with ordinary FES and CCFES based on type 2 fuzzy PID control, the TTFES mode based on type 2 fuzzy PILC-SO control can more effectively improve the consistency between the wrist extension trajectory and the target trajectory.

[0113] The present invention adopts a type 2 fuzzy ILC closed-loop feedback control algorithm to accurately adjust control parameters through learning of historical control experience, so that the controlled object (model or patient limb) approaches the target motion trajectory, reduces the target trajectory tracking accuracy, and improves the action completion of the controlled object; and, before the type 2 fuzzy ILC is applied, the present invention proposes to first use a type 2 fuzzy PID to significantly reduce the error of the controlled object in reconstructing the target motion trajectory, reduce the number of iterative learning times of the type 2 fuzzy iterative ILC control algorithm, and improve the real-time performance of limb motion reconstruction; the type 2 fuzzy PILC-SO closed-loop feedback control algorithm proposed by the present invention will not cause a decrease in the correlation coefficient of limb motion trajectory reconstruction due to an increase in the number of repetitions of rehabilitation training actions for paralyzed limbs of stroke patients.

[0114] When applying the closed-loop feedback control method for functional electrical stimulation provided by the present invention, it is not necessary to Figure 2 The steps are executed in the order shown. The specific execution order of the steps can be determined according to needs, and the present invention does not limit this.

[0115] The above is a closed-loop feedback control method for functional electrical stimulation provided by one or more embodiments of the present invention. Based on the same idea, the present invention also provides a corresponding closed-loop feedback control device for functional electrical stimulation, such as Fig.13 shown.

[0116] Fig.13 A schematic diagram of a closed-loop feedback control device for functional electrical stimulation provided by the present invention, the device 1300 comprises:

[0117] A determination module 1301 is used to determine a target motion trajectory from the actual posture to the expected posture according to the actual posture and the expected posture of the affected limb, and divide the target motion trajectory into a plurality of nodes;

[0118] The first iteration module 1302 is used to iteratively optimize the multiple nodes. In the first iteration, the initial control parameters of the multiple nodes are calculated multiple times by the type 2 fuzzy PID controller to obtain candidate control parameters of the multiple nodes, and functional electrical stimulation is performed on the affected limb by the candidate control parameters;

[0119] An updating module 1303 is used to determine the error of the current node according to the actual posture and the expected posture of the current node starting from the second iteration, and to update the learning rate gain of the type 2 fuzzy iterative learning controller according to the error of the current node;

[0120] The second iteration module 1304 is used to substitute the candidate control parameters of the previous iteration and the errors of the historical nodes in the current iteration into the type 2 fuzzy iterative learning controller to obtain the candidate control parameters of the current node in the current iteration until the iteration is completed; the candidate control parameters are used for functional electrical stimulation of the affected limb.

[0121] For the specific definition of the closed-loop feedback control device for functional electrical stimulation, please refer to the definition of the closed-loop feedback control method for functional electrical stimulation above, which will not be repeated here. Each module in the above-mentioned closed-loop feedback control device for functional electrical stimulation can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0122] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor of an STM32 or other microcontroller, it can be used to perform the above Figure 2 A closed-loop feedback control method for functional electrical stimulation is provided.

[0123] The present invention also provides Fig.14 The structural diagram of the computer device shown in FIG. Fig.14 As shown, at the hardware level, the computer device includes an STM32 or other microcontroller, which integrates a processor, an internal bus, a network interface, a memory, and a non-volatile memory (such as Flash), and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 2 A closed-loop feedback control method for functional electrical stimulation is provided.

[0124] It can be understood by a person of ordinary skill in the art that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium, and the computer program can include the processes of the embodiments of the above-mentioned methods when executed by the processor of STM32 or other microcontrollers. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0125] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present invention.

Claims

1. A closed-loop feedback control method for functional electrical stimulation, characterized in that: include: According to the actual posture and the expected posture of the affected limb, a target motion trajectory from the actual posture to the expected posture is determined, and the target motion trajectory is divided into a plurality of nodes; Iterative optimization is performed on multiple nodes. In the first iteration, the initial control parameters of multiple nodes are calculated multiple times by using a type 2 fuzzy PID controller to obtain candidate control parameters of multiple nodes, and functional electrical stimulation is performed on the affected limb by using the candidate control parameters. Starting from the second iteration, the error of the current node is determined according to the actual posture and the expected posture of the current node, and the learning rate gain of the type 2 fuzzy iterative learning controller is updated according to the error of the current node; The candidate control parameters of the previous iteration and the errors of the historical nodes of the current iteration are substituted into the type 2 fuzzy iterative learning controller to obtain the candidate control parameters of the current node of the current iteration until the iteration is completed; the candidate control parameters are used for functional electrical stimulation of the affected limb.

2. The method according to claim 1, characterized in that According to the error of the current node, the learning rate gain of the type 2 fuzzy iterative learning controller is updated, including: According to the error of the current node and the error of the previous node, determine the error change rate of the current node; Perform type 2 fuzzy inference on the error change rate and error to obtain the learning rate gain of the current node.

3. The method according to claim 2, characterized in that Perform type 2 fuzzy reasoning on the error change rate and error to obtain the learning rate gain of the current node, including: According to the preset domain and membership function, the error change rate and the error are fuzzified to obtain the membership of the error change rate and the membership of the error; Based on the fuzzy rule table, the expected value of the learning rate gain is determined according to the membership of the error change rate and the membership of the error; The expected value of the learning rate gain is converted into the actual value of the learning rate gain according to the interval mapping formula.

4. The method according to claim 1, characterized in that: The control formula of type 2 fuzzy iterative learning controller is: u[i+1,n]=u[i,n]+K p [n]{e[n]-e[n-1]}+K i [n]e[n]+K d [n]{e[n]-2e[n-1]+e[n-2]}; Wherein, u[i+1,n] is the candidate control parameter of the nth node at the i+1th iteration, and u[i,n] is the candidate control parameter of the nth node at the i-th iteration; K p [n], K i [n] and K d [n] is the learning rate gain of the nth node on the trajectory.

5. The method according to claim 1, characterized in that The process of obtaining the actual and expected postures of the affected limb includes: The torque is collected by an inertial measurement unit worn on the healthy limb, and the torque of the healthy limb is determined as the expected posture of the affected limb, and the actual posture is collected by the inertial measurement unit worn on the affected limb.

6. A closed-loop feedback control device for functional electrical stimulation, characterized in that: include: A determination module, used for determining a target motion trajectory from the actual posture to the expected posture according to the actual posture and the expected posture of the affected limb, and dividing the target motion trajectory into a plurality of nodes; The first iteration module is used for iterative optimization of multiple nodes. In the first iteration, the initial control parameters of multiple nodes are calculated multiple times by the type 2 fuzzy PID controller to obtain candidate control parameters of the multiple nodes, and functional electrical stimulation is performed on the affected limb by the candidate control parameters. An updating module is used to determine the error of the current node according to the actual posture and the expected posture of the current node starting from the second iteration, and to update the learning rate gain of the type 2 fuzzy iterative learning controller according to the error of the current node; The second iteration module is used to substitute the candidate control parameters of the previous iteration and the errors of the historical nodes in the current iteration into the type 2 fuzzy iterative learning controller to obtain the candidate control parameters of the current node in the current iteration until the iteration is completed; the candidate control parameters are used to perform functional electrical stimulation on the affected limb.

7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor of an STM32 or other microcontroller, the method according to any one of claims 1 to 5 is implemented.

8. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor is a processor of STM32 or other microcontrollers, and when the processor executes the program, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • PID-adjusting precise control method of functional electrical stimulation (FES) based on BP neural network

    CN101596338A

  • Setting method of functional electrical stimulation PID (Proportion Integration Differentiation) parameter double source characteristic fusion particle swarm

    CN101816822A

  • Intelligent control system for environmental simulation system based on a fuzzy neural network

    CN102122132A

  • A precise control method for functional electrical stimulation

    CN102274581A

  • Functional electro stimulation closed loop fuzzy proportional integral derivative (PID) control method

    CN102488964A