Closed-loop optimization method for cerebral apoplexy electrical stimulation treatment
By building a multi-objective optimization model and optimizing the parameters of the PID controller using an improved sled dog optimization algorithm, the problems of traditional PID control parameter curing and weak anti-interference ability are solved, and more efficient and precise current regulation of stroke electrical stimulation treatment is achieved.
Patent Information
- Application Number
- CN202510483297.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-04-17
AI Technical Summary
The curing of traditional PID parameters, weak anti-interference ability and lag in neurofeedback lead to limited efficacy of stroke electrical stimulation treatment.
Fusion of the patient's real-time EEG signal, oxygen metabolism data and lesion characteristics is carried out to build a multi-objective optimization model, optimize the parameters of the PID controller through an improved sled dog optimization algorithm, dynamically adjust the proportion, integral, and differential parameters to accurately match the patient's neuroplasticity change curve.
It improves the response speed of current regulation and individual adaptability, improves the accuracy and stability of electrical stimulation treatment, and enhances the ability to adapt to individual differences.
Smart Images

Figure CN119987191A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of PID control optimization, and in particular relates to an intelligent electrical stimulation control method for stroke treatment. Background Art
[0002] Functional electrical stimulation stimulates the paralyzed muscles or peripheral nerves of stroke patients through low-intensity electrical pulses, inducing muscle contraction to simulate normal movement patterns, helping to restore functions such as upper limb grasping and lower limb walking, while improving blood circulation, reducing muscle atrophy and joint stiffness. Its mechanism is based on activating residual neural pathways, promoting brain neural plasticity, and accelerating motor function reconstruction. It is suitable for patients with hemiplegia, muscle weakness, and spastic paralysis after stroke. The technical advantage is that it is non-invasive, and the intensity, frequency, and pulse width parameters are adjustable and precisely positioned, which can adapt to the needs of different rehabilitation stages. However, the efficacy is affected by the degree of nerve damage, muscle state, and patient tolerance, and parameters need to be adjusted individually. The future development direction focuses on intelligence, lightweight wearable devices, and multimodal combined treatment to improve rehabilitation accuracy and patient compliance, and promote the transformation of stroke rehabilitation from passive assistance to active functional remodeling.
[0003] PID control is a closed-loop regulation algorithm that dynamically adjusts model behavior by calculating the deviation between the target value and the actual output in real time. Its core consists of three parts: proportional (P), integral (I) and differential (D). The proportional link responds quickly based on the current error, but there may be residual steady-state error. The integral link accumulates historical errors to eliminate long-term deviations, but it is easy to cause overshoot. The differential link predicts the error change trend and suppresses model oscillation. The three are linearly combined to achieve a balance between response speed, stability and accuracy. PID is widely used in industrial control, automobiles and medical equipment. It has the characteristics of simple structure and strong adaptability, but parameter setting relies on experience or algorithm optimization, and has limited effect on nonlinear and strong interference models. It is often necessary to combine fuzzy control or adaptive algorithms to improve robustness in complex scenarios.
[0004] The Sled Dog Optimization (SDO) algorithm is an intelligent optimization algorithm that simulates the collaborative behavior of a sled dog group. It balances global exploration and local development capabilities by dynamically allocating lead dogs and follower dogs and combining information sharing mechanisms. Its process includes initializing a random population, selecting a lead dog based on fitness, and follower dogs adjusting their movement direction and step size according to the leader's position and neighboring individuals, and avoiding premature convergence through role switching. The algorithm performs well in high-dimensional multi-peak optimization problems and is suitable for engineering design, path planning and other fields. Its advantages are that group division of labor improves search efficiency, it has few parameters and is easy to implement; however, there is a problem of high computational cost due to frequent role switching. In the future, the convergence speed can be optimized through adaptive strategies. Research shows that SDO has more advantages than traditional algorithms in terms of optimization accuracy, and potential expansion directions include dynamic environment optimization and multi-objective scenario applications. Summary of the invention
[0005] The purpose of the present invention is to: in order to solve the problems of traditional PID control parameter solidification, weak anti-interference ability and neural feedback lag, integrate the patient's real-time EEG signal, blood oxygen metabolism data and lesion characteristics, construct a multi-objective optimization model, and optimize the dynamic performance of the PID controller in the electrical stimulation treatment of stroke through the improved sled dog optimization algorithm to improve the response speed and individual adaptability of current regulation. The improved sled dog algorithm introduces the chaotic mapping optimization strategy, dynamic hybrid collaborative search strategy and elite Levy dynamic navigation strategy that integrate Halton sequence, dynamically adjusts the proportional, integral and differential parameters of PID, accurately matches the patient's neural plasticity change curve, and realizes closed-loop optimization control of current intensity, frequency and action time. This technology breaks through the traditional empirical parameter adjustment mode, and its innovation lies in the deep coupling of swarm intelligence algorithm with classic PID control, providing an intelligent control model with both robustness and adaptability for electrical stimulation treatment of stroke.
[0006] In order to achieve the above object, the present invention adopts the following technical solution.
[0007] A closed-loop optimization method for electrical stimulation treatment of stroke, the specific steps are as follows.
[0008] S1. Construct a stroke electrical stimulation control model, wherein the control model includes: an error calculation module, a PID controller module, an improved sled dog optimization algorithm module, a stroke electrical stimulation treatment controlled object module, and a current detection module.
[0009] S2. Improve the sled dog optimization algorithm. The specific improvement strategies are as follows: S21. Use a chaotic mapping optimization strategy that integrates the Halton sequence to generate the initial population of the algorithm. Add chaotic perturbations on the basis of the Halton sequence. Using the perturbed population as the initial population of the algorithm can improve the coverage of the search space and enhance the diversity of the initial individuals, helping the algorithm to explore more effectively in the early stages. S22. Improve the mathematical model of the obstacle avoidance phase of the sled dog optimization algorithm using a dynamic hybrid collaborative search strategy based on the dynamic inertia weight factor ω(t) and the Gaussian variation term , as the number of iterations increases, the population position is constantly adjusted to update the population position; S23. An elite Levy dynamic navigation strategy is used to improve the mathematical model of the disoriented stage of the sled dog optimization algorithm. Elite-guided directional convergence and Levy flight global perturbation mechanism are introduced. The large-step perturbation of Levy flight helps escape from the local optimum, and elite guidance ensures the correctness of the convergence direction.
[0010] S3. Use the improved sled dog optimization algorithm to adjust the parameters of the PID controller module in the stroke electrical stimulation control model, and obtain the optimal Kp, Ki, and Kd parameters through optimization.
[0011] S4. Input the obtained optimal Kp, Ki, and Kd parameters into the stroke electrical stimulation control model to optimize the control effect.
[0012] Preferably, in S1, an optimized stroke electrical stimulation control model is constructed, which includes the following modules: an electrical stimulation signal generation module, an error calculation module, a PID controller module, an improved sled dog optimization algorithm module and a current detection module. The electrical stimulation signal generation module generates an initial electrical stimulation signal according to the set pulse parameters, and forms a closed circuit with the skin through a bipolar or multipolar surface electrode, so that the voltage signal generates a current at the electrode-skin contact interface. The current passes through the epidermis of the skin and enters the muscles or nerves of the underlying tissue to form a stimulation path, and a series resistor is used. The equivalent circuit model with capacitor C is used to simulate the electrical conduction between the skin and the electrode. The initial electrical stimulation signal is shown in formula (1); (1); In formula (1), Indicates the actual output current, represents the basic voltage amplitude, f represents the amplitude of the pulse signal, b represents the width of the pulse signal, represents the function that generates a pulse signal at time t, represents the initial contact impedance, Indicates the amplitude of dynamic impedance change, represents the impedance change rate, represents the angular frequency, and C represents the equivalent capacitance.
[0013] Preferably, in S1, the actual output current of the model is monitored in real time by the current detection module and transmitted to the error calculation module, and compared with the set expected current target, so as to obtain a real-time error signal e(t). The error signal is input to the PID controller to generate a control signal u(t) for adjusting the amplitude of the electrical stimulation signal, and finally forms the electrical stimulation current actually applied to the human body through the nonlinear electrical impedance network of the tissue. , to achieve accurate closed-loop control of the output current. To improve the adaptability and stability of the model, the parameters of the PID controller can be adjusted online through the improved sled dog optimization algorithm module. u(t) and The calculation formulas are shown in formula (2) and formula (3) respectively; (2); (3); In formula (2) and formula (3), represents the proportional gain, represents the integral gain, represents the differential gain, e(t) represents the real-time error, Indicates the actual electrical stimulation current applied to the human body.
[0014] Preferably, in order to accurately simulate the propagation and response dynamic behavior of electrical stimulation in tissues, based on the actual electrical stimulation current applied to the human body Based on this, we further introduce the second-order transfer function , which is used to describe the inertial hysteresis and attenuation characteristics of the current signal in the tissue. The specific formula is shown in formula (4); (4); In formula (4), I(s) is the Laplace expression of the actual response current of the tissue, represents the Laplace transform of the electrical stimulation current actually applied to the human body, s represents the complex frequency domain variable in the Laplace transform, represents the natural frequency, Represents the damping ratio.
[0015] Preferably, in S21, a chaotic mapping optimization strategy integrating Halton sequence is used to generate the initial population of the algorithm. First, the first N positions in the Halton sequence are taken as the initial population positions. A chaotic disturbance is added on the basis of the Halton sequence, and the disturbed population is used as the initial population of the algorithm. The mathematical model of the chaotic mapping optimization strategy integrating Halton sequence is shown in formula (5); (5); In formula (5), Dog represents the initialization matrix of the entire population, Lb represents the lower bound of the search in the entire space, and Ub represents the upper bound of the search area. represents the balance coefficient, Halton represents the N-dimensional low-discrepancy vector generated by the Halton sequence, and Chaos is the N-dimensional vector generated by the chaotic map.
[0016] Preferably, the chaotic mapping optimization strategy integrating Halton sequence combines Halton sequence and chaotic perturbation to achieve dual-effect synergy. Halton sequence generates a uniformly distributed initial population to ensure global search efficiency. Chaotic perturbation injects controllable randomness on the basis of uniform distribution, enhances diversity and suppresses premature convergence. The two work together to form a dynamic balance in which uniform guidance is global and chaos is used to explore local.
[0017] Preferably, in S22, a dynamic hybrid collaborative search strategy is used to improve the mathematical model of the obstacle avoidance phase of the sled dog optimization algorithm, by introducing a dynamic inertia weight factor ω(t), dynamically adjusting the search step size or speed of each sled dog, and introducing a Gaussian variation term. , which introduces randomness into the search process, helps the algorithm to jump out of the local optimal solution, enhances the global search capability, and introduces Implement a leader and follower mechanism, when the random factor When the initial obstacle avoidance position is updated, the random factor When the leader dog leads the group to move towards a better path, the position update is executed. The improved mathematical model of the obstacle avoidance stage is shown in equations (6) and (7); when hour, (6); when hour, (7); In formula (6) and formula (7), represents the position of the ith individual, , , represents a random number between [0,1], represents a position randomly selected from the four best positions, Indicates the position of the individual with the worst fitness value, k takes the value of 1 or -1. represents the adaptive search factor, represents the disturbance adjustment factor, represents the best historical position of the i-th individual, represents the local search intensity coefficient, It follows the standard normal distribution A random number, represents the collaborative search term strength coefficient, represents the dynamic inertia weight factor, and its mathematical formula is shown in formula (8); (8); In formula (8), t is the current iteration number, T is the maximum iteration number, and are the maximum and minimum inertia weights respectively.
[0018] Preferably, the dynamic hybrid collaborative search strategy introduces a dynamic inertia weight factor in the early stage of obstacle avoidance. , Gaussian mutation enhances path exploration capabilities and avoids local stagnation. In the later stage of obstacle avoidance, noise interference is suppressed through leader experience guidance, path smoothness and convergence efficiency are improved, and more flexible search strategies, stronger global search capabilities and more stable convergence are achieved, thereby improving the optimization efficiency and effect of the algorithm, and improving its robustness and adaptability in complex obstacle scenarios.
[0019] Preferably, in S23, an elite Levy dynamic navigation strategy is used to improve the mathematical model of the disorientation phase of the sled dog optimization algorithm, and the elite Levy dynamic navigation strategy introduces Levy flight to generate random disturbances and uses the optimal position To guide the update of the population, maintain the stability of local search, take into account large-scale exploration and local development, the improved mathematical model of the disorientation stage is shown in formula (9); (9); In formula (9), represents the position of the ith individual, r represents a random number between [0,1], represents a position randomly selected from the four best positions, Represents the weight coefficient, with a value between [0,1]. represents the global optimal individual, i.e., the elite individual. represents the Levy flight disturbance intensity, represents the Levy flight step length, C(t) represents the dynamic correction intensity coefficient, ζ(x) represents the probability density function of the standard normal distribution, and the mathematical expressions are shown in (10) and (11); (10); (11); In formula (10) and formula (11), t is the current iteration number, T is the maximum iteration number, ζ(x) is a randomly generated number following the standard normal distribution, with a mean of 0 and a variance of 1.
[0020] Preferably, the elite Levy dynamic navigation strategy combines the elite guided directional convergence and the Levy flight global perturbation mechanism, which improves the randomness and flexibility of the population update while ensuring the direction of the population update. Through the direct guidance of the elite individuals, the random walk is reduced and the convergence of the population to the optimal area is accelerated. The Levy flight generates occasional large step jumps, which enables the algorithm to jump out of the local optimum. It is particularly suitable for multi-peak function optimization and high-dimensional space search. While maintaining low computational complexity, it significantly improves the global search capability, convergence speed and robustness of the algorithm.
[0021] Preferably, in S3, the parameters of the PID controller module of the stroke electrical stimulation control model are adjusted by using the improved sled dog optimization algorithm to obtain the best Kp, Ki, and Kd parameters through optimization, and the specific steps are as follows: S31, encoding the control parameters Kp, Ki, and Kd of the current PID controller as the solution of the sled dog algorithm search space. As the algorithm iterates, the position of the sled dog is the solution of the current PID controller parameters; S32. Initialize the parameters of the improved sled dog optimization algorithm, including population size N, maximum number of iterations T, spatial dimension Dim, search upper bound Ub, search lower bound Lb, sort the sled dogs according to the retirement mechanism, and calculate the selected sled dogs. ; S33, using a chaotic mapping optimization strategy fused with Halton sequence to generate the initial population of the algorithm, the initialization mathematical model is shown in formula (5); S34, calculating the fitness values of the individuals in the population of the improved sled dog optimization algorithm, and selecting the current optimal individual according to the fitness value. The fitness value calculation formula is shown in formula (12); (12); In formula (12), J represents the fitness value, Iteration time The error between the target value and the current value of the controlled object; S35. Update the positions of individuals in the population by improving the mathematical model of the sled dog optimization algorithm, and search for the best individual by updating the positions; S36. Determine whether the current number of iterations t reaches the maximum number of iterations T. If not, continue to search for the best solution. Otherwise, exit the search for the best solution and use the output as the optimization to obtain the best Kp, Ki, and Kd.
[0022] Preferably, in said S35, the positions of individuals in the population are updated by improving the mathematical model of the sled dog optimization algorithm, which is mainly divided into an obstacle avoidance stage, a normal driving stage and a disorientation stage, and the specific steps are: In the following inequality, SD is a random number in the interval [0,1], A=0.7, B=0.9; step1. When , the obstacle avoidance phase of the algorithm is executed. For specific formulas, refer to equations (6) and (7); step2. When When the position of the sled dogs remains unchanged, the algorithm is executed in the normal driving stage, and the speed mathematical models of the leading dog, the middle dog, and the last dog are shown in equations (13), (14), and (15), respectively; (13); (14); (15); In formulas (13), (14), and (15), represents the speed of the ith individual, represents the adaptive weight factor, represents cognitive learning factor, represents the social learning factor, , , represents a random number between [0,1], represents the best historical position of the i-th individual, represents the position of the ith individual, represents a position randomly selected from the four best positions, represents the position of the current individual in the i-2th iteration, represents the predicted position of the current individual after i+2 iterations, represents another dog in the same group, L takes values of 0 and 1, Equivalent to a sled pulled by sled dogs, r stands for integer; The mathematical model for updating the position of the sled dogs during the normal driving phase is shown in equation (16); (16); In formula (16), represents the position of the ith individual, represents the speed of the ith individual; step3. When When , the algorithm's disorientation phase is executed. For the specific formula, refer to formula (9); Step 4: Update the optimal individual position in the population, and continue to execute step 1 to step 4 within the maximum iteration range to search for the optimal individual.
[0023] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are as follows.
[0024] The present invention proposes a closed-loop optimization method for electrical stimulation treatment of stroke, which improves the dynamic performance of PID control by improving the sled dog optimization algorithm, enhances the diversity of the population and the coverage of the search space by adopting a chaotic equilibrium initialization strategy, so that the algorithm has a stronger exploration ability in the early stage, thereby improving the stability of the optimization effect, and dynamically adjusts the population position change by using a dynamic hybrid collaborative search strategy, improves the convergence speed and global optimization ability of the algorithm in the iterative process, enables the control parameters to adapt to individual differences more quickly, ensures the correctness of the convergence direction by elite guidance, and utilizes large-step global disturbance to enhance the ability to jump out of the local optimum, further improving the optimization accuracy and robustness. Overall, the integration of these optimization strategies effectively improves the dynamic response capability and adaptability of PID control, makes electrical stimulation treatment more accurate and efficient, and can better adapt to individual needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 Flowchart of a closed-loop optimization method for electrical stimulation therapy for stroke.
[0026] Figure 2 This is the PID control model diagram for electrical stimulation treatment of stroke.
[0027] Figure 3 This is a comparison chart of the fitness values of the original sled dog optimization algorithm and the improved sled dog optimization algorithm during the optimization process.
[0028] Figure 4 Comparison curve of PID control response of stroke electrical stimulation control model optimized by original sled dog optimization algorithm and improved sled dog optimization algorithm. DETAILED DESCRIPTION
[0029] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention; it is obvious that the described embodiments are only part of the embodiments of the present invention, rather than all 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.
[0030] See also Figure 1-Figure 4 , the present invention provides a technical solution.
[0031] The present invention provides a technical solution: a closed-loop optimization method for electrical stimulation treatment of stroke, specifically comprising the following steps: Figure 1 shown.
[0032] S1. Construct a stroke electrical stimulation control model, such as Figure 2As shown, the control model includes: an error calculation module, a PID controller module, an improved sled dog optimization algorithm module, a stroke electrical stimulation treatment controlled object module, and a current detection module.
[0033] Furthermore, in S1, an optimized stroke electrical stimulation control model is constructed, which includes the following modules: an electrical stimulation signal generation module, an error calculation module, a PID controller module, an improved sled dog optimization algorithm module and a current detection module. The electrical stimulation signal generation module generates an initial electrical stimulation signal according to the set pulse parameters, and forms a closed circuit with the skin through a bipolar or multipolar surface electrode, so that the voltage signal generates a current at the electrode-skin contact interface. The current passes through the epidermis of the skin and enters the muscles or nerves of the underlying tissue to form a stimulation path, and a series resistor is used. The equivalent circuit model with capacitor C is used to simulate the electrical conduction between the skin and the electrode. The initial electrical stimulation signal is shown in formula (1); (1); In formula (1), Indicates the actual output current, represents the basic voltage amplitude, f represents the amplitude of the pulse signal, b represents the width of the pulse signal, represents the function that generates a pulse signal at time t, represents the initial contact impedance, Indicates the amplitude of dynamic impedance change, represents the impedance change rate, represents the angular frequency, and C represents the equivalent capacitance.
[0034] Furthermore, in S1, the actual output current of the model is monitored in real time by the current detection module and transmitted to the error calculation module, and compared with the set expected current target, so as to obtain a real-time error signal e(t). The error signal is input to the PID controller to generate a control signal u(t) for adjusting the amplitude of the electrical stimulation signal, and finally forms the electrical stimulation current actually applied to the human body through the nonlinear electrical impedance network of the tissue. , to achieve accurate closed-loop control of the output current. To improve the adaptability and stability of the model, the parameters of the PID controller can be adjusted online through the improved sled dog optimization algorithm module. u(t) and The calculation formulas are shown in formula (2) and formula (3) respectively; (2); (3); In formula (2) and formula (3), represents the proportional gain, represents the integral gain, represents the differential gain, e(t) represents the real-time error, Indicates the actual electrical stimulation current applied to the human body.
[0035] Furthermore, in order to accurately simulate the propagation and response dynamic behavior of electrical stimulation in tissues, based on the actual electrical stimulation current applied to the human body Based on this, we further introduce the second-order transfer function , which is used to describe the inertial hysteresis and attenuation characteristics of the current signal in the tissue. The specific formula is shown in formula (4); (4); In formula (4), I(s) is the Laplace expression of the actual response current of the tissue, represents the Laplace transform of the electrical stimulation current actually applied to the human body, s represents the complex frequency domain variable in the Laplace transform, represents the natural frequency, Represents the damping ratio.
[0036] S2. Improve the sled dog optimization algorithm. The specific improvement strategies are as follows: S21. Use a chaotic mapping optimization strategy that integrates the Halton sequence to generate the initial population of the algorithm. Add chaotic perturbations on the basis of the Halton sequence. Using the perturbed population as the initial population of the algorithm can improve the coverage of the search space and enhance the diversity of the initial individuals, helping the algorithm to explore more effectively in the early stages. S22. Improve the mathematical model of the obstacle avoidance phase of the sled dog optimization algorithm using a dynamic hybrid collaborative search strategy based on the dynamic inertia weight factor ω(t) and the Gaussian variation term , as the number of iterations increases, the population position is constantly adjusted to update the population position; S23. An elite Levy dynamic navigation strategy is used to improve the mathematical model of the disoriented stage of the sled dog optimization algorithm. Elite-guided directional convergence and Levy flight global perturbation mechanism are introduced. The large-step perturbation of Levy flight helps escape from the local optimum, and elite guidance ensures the correctness of the convergence direction.
[0037] Furthermore, in S21, a chaotic mapping optimization strategy integrating Halton sequence is used to generate the initial population of the algorithm. First, the first N positions in the Halton sequence are taken as the initial population positions, and chaotic perturbation is added on the basis of the Halton sequence. The perturbed population is used as the initial population of the algorithm. The mathematical model of the chaotic mapping optimization strategy integrating Halton sequence is shown in formula (5); (5); In formula (5), Dog represents the initialization matrix of the entire population, Lb represents the lower bound of the search in the entire space, and Ub represents the upper bound of the search area. represents the balance coefficient, Halton represents the N-dimensional low-discrepancy vector generated by the Halton sequence, and Chaos is the N-dimensional vector generated by the chaotic map.
[0038] Furthermore, in S22, a dynamic hybrid collaborative search strategy is used to improve the mathematical model of the obstacle avoidance phase of the sled dog optimization algorithm, by introducing a dynamic inertia weight factor ω(t), dynamically adjusting the search step size or speed of each sled dog, and introducing a Gaussian variation term. , which introduces randomness into the search process, helps the algorithm to jump out of the local optimal solution, enhances the global search capability, and introduces Implement a leader and follower mechanism, when the random factor When the initial obstacle avoidance position is updated, the random factor When the leader dog leads the group to move towards a better path, the position update is executed. The improved mathematical model of the obstacle avoidance stage is shown in equations (6) and (7); when hour, (6); when hour, (7); In formula (6) and formula (7), represents the position of the ith individual, , , represents a random number between [0,1], represents a position randomly selected from the four best positions, Indicates the position of the individual with the worst fitness value, k takes the value of 1 or -1. represents the adaptive search factor, represents the disturbance adjustment factor, represents the best historical position of the i-th individual, represents the local search intensity coefficient, It follows the standard normal distribution A random number, represents the collaborative search term strength coefficient, represents the dynamic inertia weight factor, and its mathematical formula is shown in formula (8); (8); In formula (8), t is the current iteration number, T is the maximum iteration number, and are the maximum and minimum inertia weights respectively.
[0039] Furthermore, in S23, an elite Levy dynamic navigation strategy is used to improve the mathematical model of the disorientation phase of the sled dog optimization algorithm, introducing Levy flight to generate random disturbances and using the optimal position To guide the update of the population, maintain the stability of local search, take into account large-scale exploration and local development, the improved mathematical model of the disorientation stage is shown in formula (9); (9); In formula (9), represents the position of the ith individual, r represents a random number between [0,1], represents a position randomly selected from the four best positions, Represents the weight coefficient, with a value between [0,1]. represents the global optimal individual, i.e., the elite individual. represents the Levy flight disturbance intensity, represents the Levy flight step length, C(t) represents the dynamic correction intensity coefficient, ζ(x) represents the probability density function of the standard normal distribution, and the mathematical expressions are shown in (10) and (11); (10); (11); In formula (10) and formula (11), t is the current iteration number, T is the maximum iteration number, ζ(x) is a randomly generated number following the standard normal distribution, with a mean of 0 and a variance of 1.
[0040] S3, using the improved sled dog optimization algorithm to adjust the parameters of the PID controller module of the stroke electrical stimulation control model, the optimal Kp, Ki, and Kd parameters are obtained through optimization. The specific steps are as follows: S31, encoding the control parameters Kp, Ki, and Kd of the current PID controller as the solution of the sled dog algorithm search space. As the algorithm iterates, the position of the sled dog is the solution of the current PID controller parameters; S32. Initialize the parameters of the improved sled dog optimization algorithm, including population size N, maximum number of iterations T, spatial dimension Dim, search upper bound Ub, search lower bound Lb, sort the sled dogs according to the retirement mechanism, and calculate the selected sled dogs. ; S33, using a chaotic mapping optimization strategy fused with Halton sequence to generate the initial population of the algorithm, the initialization mathematical model is shown in formula (5); S34, calculate the fitness value of the individuals in the population of the improved sled dog optimization algorithm, select the current optimal individual according to the fitness value, and the fitness value calculation formula is shown in formula (12): (12); In formula (12), J represents the fitness value, Iteration time The error between the target value and the current value of the controlled object; S35. Update the positions of individuals in the population by improving the mathematical model of the sled dog optimization algorithm, and search for the best individual by updating the positions; S36. Determine whether the current number of iterations t reaches the maximum number of iterations T. If not, continue to search for the best solution. Otherwise, exit the search for the best solution and use the output as the optimization to obtain the best Kp, Ki, and Kd.
[0041] Furthermore, in the S35, the positions of individuals in the population are updated by improving the mathematical model of the sled dog optimization algorithm, which is mainly divided into an obstacle avoidance stage, a normal driving stage and a disorientation stage, and the specific steps are as follows: In the following inequality, SD is a random number in the interval [0,1], A=0.7, B=0.9; step1. When When , the obstacle avoidance phase of the algorithm is executed. For specific formulas, refer to equations (6) and (7); step2. When When , the position of the sled dogs remains unchanged, and the normal driving phase of the algorithm is executed. The speed mathematical models of the leading dog, the middle dog, and the last dog are shown in equations (13), (14), and (15), respectively; (13); (14); (15); In formulas (13), (14), and (15), represents the speed of the ith individual, represents the adaptive weight factor, represents cognitive learning factor, represents the social learning factor, , , represents a random number between [0,1], represents the best historical position of the i-th individual, represents the position of the ith individual, represents a position randomly selected from the four best positions, represents the position of the current individual in the i-2th iteration, represents the predicted position of the current individual after i+2 iterations, represents another dog in the same group, L takes values of 0 and 1, Equivalent to a sled pulled by sled dogs, r stands for integer; The mathematical model for updating the position of the sled dogs during the normal driving phase is shown in equation (16); (16); In formula (16), represents the position of the ith individual, represents the speed of the ith individual; step3. When When , the algorithm is executed in the disorientation phase. For the specific formula, refer to formula (9); Step 4: Update the optimal individual position in the population, and continue to execute step 1 to step 4 within the maximum iteration range to search for the optimal individual.
[0042] S4. Input the obtained optimal Kp, Ki, and Kd parameters into the stroke electrical stimulation control model to optimize the control effect.
[0043] Furthermore, in order to verify the superior performance of a closed-loop optimization method for stroke electrical stimulation therapy proposed in the present invention compared with other methods, the present invention will conduct simulation experiments through Matlab and Simulink to compare the performance of the improved sled dog optimization algorithm and the original sled dog optimization algorithm in optimizing the PID controller. First, the mathematical model of the sled dog optimization algorithm is improved in Matlab, and a stroke electrical stimulation control model is constructed in Simulink. The model includes an error calculation module, a PID controller module, a current detection module, an improved sled dog optimization algorithm module, and a stroke electrical stimulation therapy controlled object module. In the model, the electrical response of human tissue is modeled using a second-order transfer function, in which the natural frequency Set to 3, the damping ratio Set to 1.2, Set as ,but , initialize the parameters of the improved sled dog optimization algorithm, set the population size N=200, the problem dimension Dim=3, the maximum number of iterations to 35, run the Matlab program, and obtain the fitness value comparison chart of the original sled dog optimization algorithm and the improved sled dog optimization algorithm in the optimization process, as shown in Figure 3As shown, in the first 8 iterations, the fitness value of the improved sled dog optimization algorithm dropped rapidly to near the optimal fitness value, and the optimization speed was faster than that of the original algorithm. After about the 16th iteration, the fitness value tended to be stable, and the optimization accuracy was higher, thereby effectively improving the current output accuracy of electrical stimulation.
[0044] Furthermore, the improved sled dog optimization algorithm and the original sled dog optimization algorithm were used to adjust the parameters of the PID controller of the stroke electrical stimulation control model, and the optimal control parameters obtained by optimization were input into the PID controller model to evaluate the control effect of electrical stimulation. Figure 4 The response curve comparison of the stroke electrical stimulation control model under the action of two optimization algorithms is shown. In the experiment, the target value of the control amount of electrical stimulation is set to 1 unit. Figure 4 It can be seen that the response curve of the PID controller optimized by the improved sled dog optimization algorithm has lower overshoot, faster response speed, and better steady-state performance. In comparison, the PID controller optimized by the original sled dog optimization algorithm performs weakly in dynamic response, with large overshoot and long adjustment time. The PID controller optimized by the improved sled dog optimization algorithm performs better in the application of electroacupuncture and electrostimulation control, and can adjust the current output to the target value faster, reduce the influence of dynamic errors, and make the electrostimulation current quickly reach a stable state. This fast response characteristic not only helps to improve the adaptability and robustness of the model, but also reduces the discomfort of patients during the treatment process, ensuring the accuracy and safety of electrostimulation therapy. In addition, the lower overshoot means that the model will not produce excessive current fluctuations during the adjustment process, further reducing the potential risk of damage to neural tissue. Therefore, the improved sled dog optimization algorithm has important application value in the field of electrostimulation control, and can significantly improve the accuracy and stability of electrostimulation therapy for stroke.
Claims
1. A closed-loop optimization method for electrical stimulation therapy of stroke, characterized in that: The mathematical model of the sled dog optimization algorithm was improved, and the improved sled dog optimization algorithm was used to optimize the parameters of the PID controller for stroke electrical stimulation therapy. The specific steps are as follows: S1. Constructing a stroke electrical stimulation control model, wherein the control model includes: an error calculation module, a PID controller module, an improved sled dog optimization algorithm module, an electrical stimulation signal generation module, and a current detection module; S2. Improve the sled dog optimization algorithm. The specific improvement strategies are as follows: S21, using a chaotic mapping optimization strategy fused with Halton sequence to generate the initial population of the algorithm; S22. Improve the mathematical model of the obstacle avoidance phase of the sled dog optimization algorithm using a dynamic hybrid collaborative search strategy based on the dynamic inertia weight factor ω(t) and the Gaussian variation term , as the number of iterations increases, the population position is updated; S23. Use an elite Levy dynamic navigation strategy to improve the mathematical model of the disorientation phase of the sled dog optimization algorithm, introduce elite guided directional convergence and Levy flight global perturbation mechanism to update the population position; S3, using the improved sled dog optimization algorithm to adjust the parameters of the PID controller module in the stroke electrical stimulation control model, and obtaining the best Kp, Ki, and Kd parameters through optimization; S4. Input the obtained optimal Kp, Ki, and Kd parameters into the stroke electrical stimulation control model to optimize the control effect.
2. A closed-loop optimization method for electrical stimulation treatment of stroke according to claim 1, characterized in that: In the S1, an optimized stroke electrical stimulation control model is constructed, which includes the following modules: an electrical stimulation signal generation module, an error calculation module, a PID controller module, an improved sled dog optimization algorithm module and a current detection module. The electrical stimulation signal generation module generates an initial electrical stimulation signal according to the set pulse parameters, and forms a closed circuit with the skin through a bipolar or multipolar surface electrode, so that the voltage signal generates a current at the electrode-skin contact interface. The current passes through the epidermis of the skin and enters the muscles or nerves of the underlying tissue to form a stimulation path. A series resistor is used The equivalent circuit model with capacitor C is used to simulate the electrical conduction between the skin and the electrode. The initial electrical stimulation signal is shown in formula (1); (1); In formula (1), Indicates the actual output current, represents the basic voltage amplitude, f represents the amplitude of the pulse signal, b represents the width of the pulse signal, represents the function that generates a pulse signal at time t, represents the initial contact impedance, Indicates the amplitude of dynamic impedance change, represents the impedance change rate, represents the angular frequency, C represents the equivalent capacitance; The actual output current of the model is monitored in real time by the current detection module and transmitted to the error calculation module, which is compared with the set expected current target to obtain the real-time error signal e(t). The error signal is input to the PID controller to generate the control signal u(t) to adjust the amplitude of the electrical stimulation signal, which is finally applied to the human body through the nonlinear impedance network of the tissue. , to achieve accurate closed-loop control of the output current. To improve the adaptability and stability of the model, the parameters of the PID controller can be adjusted online through the improved sled dog optimization algorithm module. u(t) and The calculation formulas are shown in formula (2) and formula (3) respectively; (2); (3); In formula (2) and formula (3), represents the proportional gain, represents the integral gain, represents the differential gain, e(t) represents the real-time error, Indicates the actual electrical stimulation current applied to the human body; In order to accurately simulate the propagation and response dynamic behavior of electrical stimulation in tissues, based on the actual electrical stimulation current applied to the human body, Based on this, we further introduce the second-order transfer function , which is used to describe the inertial hysteresis and attenuation characteristics of the current signal in the tissue. The specific formula is shown in formula (4); (4); In formula (4), I(s) is the Laplace expression of the actual response current of the tissue, represents the Laplace transform of the electrical stimulation current actually applied to the human body, s represents the complex frequency domain variable in the Laplace transform, represents the natural frequency, Represents the damping ratio.
3. A closed-loop optimization method for electrical stimulation treatment of stroke according to claim 2, characterized in that: In S21, a chaotic mapping optimization strategy integrating Halton sequence is used to generate the initial population of the algorithm. First, the first N positions in the Halton sequence are taken as the initial population positions. Chaotic perturbation is added on the basis of the Halton sequence, and the perturbed population is used as the initial population of the algorithm. The mathematical model of the chaotic mapping optimization strategy integrating Halton sequence is shown in formula (5); (5); In formula (5), Dog represents the initialization matrix of the entire population, Lb represents the lower bound of the search in the entire space, and Ub represents the upper bound of the search area. represents the balance coefficient, Halton represents the N-dimensional low-discrepancy vector generated by the Halton sequence, and Chaos is the N-dimensional vector generated by the chaotic map.
4. A closed-loop optimization method for electrical stimulation treatment of stroke according to claim 3, characterized in that: In S22, a dynamic hybrid collaborative search strategy is used to improve the mathematical model of the obstacle avoidance phase of the sled dog optimization algorithm, by introducing a dynamic inertia weight factor ω(t), dynamically adjusting the search step size or speed of each sled dog, and introducing a Gaussian variation term , which introduces randomness into the search process, helps the algorithm to jump out of the local optimal solution, enhances the global search capability, and introduces Implement a leader and follower mechanism, when the random factor When the initial obstacle avoidance position is updated, the random factor When the leader dog leads the group to move towards a better path, the position update is executed. The improved mathematical model of the obstacle avoidance stage is shown in equations (6) and (7); when hour, (6); when hour, (7); In formula (6) and formula (7), represents the position of the ith individual, , , represents a random number between [0,1], represents a position randomly selected from the four best positions, Indicates the position of the individual with the worst fitness value, k takes the value of 1 or -1. represents the adaptive search factor, represents the disturbance adjustment factor, represents the best historical position of the ith individual, represents the local search intensity coefficient, It follows the standard normal distribution A random number, represents the collaborative search term strength coefficient, represents the dynamic inertia weight factor, and its mathematical formula is shown in formula (8); (8); In formula (8), t is the current iteration number, T is the maximum iteration number, and are the maximum and minimum inertia weights respectively.
5. A closed-loop optimization method for electrical stimulation treatment of stroke according to claim 4, characterized in that: In S23, an elite Levy dynamic navigation strategy is used to improve the mathematical model of the disorientation phase of the sled dog optimization algorithm, introducing Levy flight to generate random disturbances and using the optimal position To guide the update of the population, the improved mathematical model of the disorientation stage is shown in formula (9); (9); In formula (9), represents the position of the ith individual, r represents a random number between [0,1], represents a position randomly selected from the four best positions, C(t) represents the dynamic correction intensity coefficient, ζ(x) represents the probability density function of the standard normal distribution, with a mean of 0 and a variance of 1. Represents the weight coefficient, with a value between [0,1]. represents the global optimal individual, i.e., the elite individual. represents the Levy flight disturbance intensity, Represents the Levi flight step length.
6. A closed-loop optimization method for electrical stimulation treatment of stroke according to claim 5, characterized in that: In S3, the parameters of the PID controller module in the stroke electrical stimulation control model are adjusted using the improved sled dog optimization algorithm, and the specific steps are as follows: S31, encoding the control parameters Kp, Ki, and Kd of the current PID controller as the solution of the sled dog algorithm search space. As the algorithm iterates, the position of the sled dog is the solution of the current PID controller parameters; S32. Initialize the parameters of the improved sled dog optimization algorithm, including population size N, maximum number of iterations T, spatial dimension Dim, search upper bound Ub, search lower bound Lb, sort the sled dogs according to the retirement mechanism, and calculate the selected sled dogs. ; S33, using a chaotic mapping optimization strategy fused with Halton sequence to generate the initial population of the algorithm, the initialization mathematical model is shown in formula (5); S34, calculating the fitness values of the individuals in the population of the improved sled dog optimization algorithm, and selecting the current optimal individual according to the fitness value. The fitness value calculation formula is shown in formula (12); (12); In formula (12), J represents the fitness value, Iteration time The error between the target value and the current value of the controlled object; S35. Update the positions of individuals in the population by improving the mathematical model of the sled dog optimization algorithm, and search for the best individual by updating the positions; S36. Determine whether the current number of iterations t reaches the maximum number of iterations T. If not, continue to search for the best solution. Otherwise, exit the search for the best solution and use the output as the optimization to obtain the best Kp, Ki, and Kd.
7. A closed-loop optimization method for electrical stimulation treatment of stroke according to claim 5, characterized in that: In the above S35, the positions of individuals in the population are updated by improving the mathematical model of the sled dog optimization algorithm, which is mainly divided into an obstacle avoidance stage, a normal driving stage and a disorientation stage. The specific steps are: In the following inequality, SD is a random number in the interval [0,1], A=0.7, B=0.9; step1. When , the obstacle avoidance phase of the algorithm is executed, refer to formula (6) and formula (7) for details; step2. When When the position of the sled dogs remains unchanged, the algorithm is executed in the normal driving stage, and the speed mathematical models of the leading dog, the middle dog, and the last dog are shown in equations (13), (14), and (15), respectively; (13); (14); (15); In formulas (13), (14), and (15), represents the speed of the ith individual, represents the adaptive weight factor, represents cognitive learning factor, represents the social learning factor, , , represents a random number between [0,1], represents the best historical position of the ith individual, represents the position of the ith individual, represents a position randomly selected from the four best positions, represents the position of the current individual in the i-2th iteration, represents the predicted position of the current individual after i+2 iterations, represents another dog in the same group, L takes values of 0 and 1, Equivalent to a sled pulled by sled dogs, r stands for integer; The mathematical model for updating the position of the sled dogs during the normal driving phase is shown in equation (16); (16); In formula (16), represents the position of the ith individual, represents the speed of the ith individual; step3. When When , the algorithm's disorientation phase is executed, refer to formula (9) for details; Step 4: Update the optimal individual position in the population, and continue to execute step 1 to step 4 within the maximum iteration range to search for the optimal individual.
Citation Information
Patent Citations
Flood control scheduling method based on fusion multi-strategy improved grey wolf algorithm
CN118014159A
Robot layout optimization method based on simulated annealing algorithm
CN118569080A
Speed control optimization method for sweeping robot
CN118818960A
Method for optimizing PID control parameters of semi-active suspension of vehicle
WO2024125584A1
Cited By
Metallurgy waste gas purification system prediction and optimization method based on artificial intelligence
CN120492910A
PID (Proportion Integration Differentiation) control method for Taylor space external fixed bracket based on improved South goose algorithm
CN120831900A
Consciousness disorder stimulation regulation and control system and method fused with electroencephalogram connection recognition
CN121635688A
A consciousness disorder stimulation regulation system and method fusing electroencephalogram connection recognition
CN121635688B
Imbalanced distribution network multi-time scale reactive power optimization method based on improved Golden Litsea Algorithm
CN122315726A